Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in the latest version: No records found in reports #56

Open
nekromoff opened this issue May 23, 2017 · 4 comments
Open

bug in the latest version: No records found in reports #56

nekromoff opened this issue May 23, 2017 · 4 comments

Comments

@nekromoff
Copy link

After upgrading both the codebase and the database (step after step from 2.4.3), the saved quick links reports don't work. They just show "No records found".

Also, any other tries to get reports for previously saved data (136 days) are showing "No records found".

@PromInc
Copy link
Owner

PromInc commented May 26, 2017

I just released an updated version - 2.5.4 that fixes some bugs on the report pages. I'm not certain that version would address this issue, but I'd still suggest using the most recent version at all times (as it should be the best and most stable version).

I'd ensure you ran the upgrade scripts (found from the homepage) in order to get your database up to date with what the codebase expects.

The next step I'd take is to verify that the data exists in the database using PHPMyAdmin or MySQL Workbench. Maybe something in the upgrade process mucked with the database?

If the data is in the database, ensure that the configuration settings are set to use that database.

If all that looks good, then I'd verify that the domain for the records in the database 100% matches that in Google Search Console.

Those are the first steps I'd take in troubleshooting this.

@nekromoff
Copy link
Author

  1. all upgrade scripts run correctly with "OK"
  2. data exists as checked directly in MySQL DB (188k rows)
  3. config is OK as the tool works
  4. domain records match as nothing has been changed in the meantime

Also, I think this bug is related to #60

@nekromoff
Copy link
Author

OK, so the issue seem to be this:
This line: https://github.com/PromInc/organic-search-analytics/blob/master/organic-search-analytics/report.php#L109

gets this query:

SELECT query, count(query) as 'queries', count(DISTINCT page) as 'pages', sum(impressions) as 'impressions', sum(clicks) as 'clicks', sum(avg_position*impressions)/sum(impressions) as 'avg_position', avg(ctr) as 'ctr' FROM search_analytics WHERE domain = 'http://example.com/' AND date >= '2017-01-01' AND date <= '2017-05-17' GROUP BY query ORDER BY clicks ASC 

and MySQL shows this error when tried via phpMyAdmin:

#1054 - Unknown column 'page' in 'field list'

and thus the report fails.

@nekromoff
Copy link
Author

nekromoff commented May 28, 2017

Failed upgrade script was the cause, after manual DB upgrade everything works now.
See #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants