Plugin Author
Ajay
(@ajay)
@reekes
The plugin saves the data in the wp_top_ten and wp_top_ten_daily tables (wp can be a different prefix if you’ve changed that). Are you able to see these? It might be easier for you to move the tables via the backend (i.e. phpMyAdmin) especially given the volume of the posts that you have vs using the import/export in the admin which relies heavily on PHP limits etc.
I’m confused on the error as I haven’t changed that piece of code and have got it working for me. Is there a way for you to suppress warnings on your install?
I do have access to the tables via phpMyAdmin. I can export wp_top_ten but it lists the post ID, which will be different on the new site. So I haven’t found a way to migrate the views count to the new site. I’ve been using WP Import Export Lite for migrating data (a great tool) but it doesn’t show wp_top_ten.
Oddly, the export/import functions in your plug in do not work for the new site which doesn’t yet have any views. The wp_top_ten table is zero length there, but I get the same error.
If I disable display_errors I get a new web page showing:
"Post ID",Visits,"Blog ID" <followed by 3 number separated by commas, then a CR>
Is that how it’s suppose to work? I’m to save the html web page myself? I was expecting it would create a CSV file to save.
Let’s say that’s how it suppose to work and I save the html, and correct it to be CSV. How should I go about updating the post IDs to the new site’s IDs?
-
This reply was modified 2 years, 6 months ago by
Jim Reekes.
Plugin Author
Ajay
(@ajay)
Sorry for the delayed response. It is supposed to be a CSV file that gets pushed to download and I’m wondering if something is preventing that in your new host where it is trying to get displayed vs being downloaded.
Does it work properly at the old host?
Nope, it fails the same way at both hosting sites. No idea why it fails. If I turn off PHP errors it was export the comma separated text to the html page.
Then I saved the html page as a file locally, and cleaned it up with a text editor.
Plugin Author
Ajay
(@ajay)
Jim, I’ll be honest that I am at a loss. I’ll try further researching to see if there is something within the code to force a download. I can’t replicate it on my own installs – both apache and nginx servers.
Plugin Author
Ajay
(@ajay)
Would you be in a position to try a beta version. I think this might be a long shot, but I made minor changes to the code to first set the headers and then try to write the file to the browser.
https://github.com/WebberZone/top-10/releases/tag/v3.3.3-RC1
BINGO!
The beta does NOT have the problem 😉
Export works. I get a csv file downloaded.
Plugin Author
Ajay
(@ajay)
Brilliant. Thanks for confirming. I’ll have this in the new version coming soon.