Most visited Page
-
Good Morning
I like to use the WP Statistics plugin. For a few days now I’ve noticed that the “Most visited Page” section on the overview page is no longer displayed.Sorry, there’s no data available for this selection.
Last 30 daysWhat could be the reason?
I have the latest version 14.10.2
-
Here a Screenshot https://ibb.co/bP0DD0W
Hi @rubbeldiekatz,
Thank you for opening the thread!
The data for this section is retrieved from the
statistics_pages
table. Could you please check if this table exists in your database and whether it contains any data?Additionally, we would appreciate it if you could send us a screenshot of the request to the endpoint that retrieves the data. You can do this by opening the browser’s Inspect tool, navigating to the Network tab, then clicking on the “Reload” button and checking the response. Please refer to the following image for guidance: https://i.vgy.me/q86gtS.png.
Thank you for your cooperation!
Regards
Good morning
The table exists, but is empty.
I followed your screenshot instructions. but the term “admin-ajax.php?action=wp_statistics_admin….” does not result in a hit. I tried with just admin-ajax.php. See the screenshot.
https://ibb.co/WzqXq0X
ThanksHi @rubbeldiekatz,
Unfortunately, the “Most visited Page” won’t display any data if the
statistics_pages
table is empty.Additionally, the screenshot you shared is not from the WP Statistics dashboard. I was specifically looking for the requests made from the “Most visited Page”. Please check this image for reference: https://i.vgy.me/q86gtS.png.
Lastly, You mentioned that recorded on the front page of your site, no hits are submitted. Could you please share your site address with us so that we can further investigate the requests?
Thank you!
Regards
Hi Matthew
Thanks for the help. Ah, I did it from the fontend. That was a misunderstanding. Now I did it from the Statistic dashboard.
The page url is https://berliner-baer-koepenick.de/Attached is a screenshot.
https://ibb.co/w6f4bpP
https://ibb.co/BBvd5nx
kind regardsThank you, @rubbeldiekatz, for providing the site address!
The screenshots you shared are not from the “Most Visited Page” section. You can check the request by clicking on the “Reload” button inside the “Most Visited Page” card. For reference, please check this image: https://i.vgy.me/KxaTdP.png. Kindly look for something like action=wp_statistics_admin_meta_box&name=pages in the browser’s Inspect tool.
Additionally, could you please check the “Most Visited Page” again? Since I visited your website, there should be some records now.
Lastly, I verified that the hits are functioning correctly. For reference, see this image: https://i.vgy.me/ND3JWs.png. Kindly ensure that the “Administrator” is unchecked under Statistics > Settings > Filtering & Exceptions > User Role Exclusions if you would like hits from admin users to be recorded as well.
Thank you for your cooperation!
Regards
Hi Matth?us
Unfortunately there are still no records, even after you visit the pages.
https://ibb.co/LJDjGmd
It says action=wp_statistics_admin_meta_box&name=pages no match found.
https://ibb.co/qNW9Rpz
Maybe it would be better if I gave them a temporary login over a secure line and they took a look at it?
I hope you can help me.
Best RegardsPS: I do this: Statistics > Settings > Filtering & Exceptions > User Role Exclusions, Admin deactivate
- This reply was modified 4 weeks, 1 day ago by rubbeldiekatz.
- This reply was modified 4 weeks, 1 day ago by rubbeldiekatz.
Dear @rubbeldiekatz,
We have been trying to replicate the issue for the past few days, but it only happens if the
statistics_pages
table is empty. Given the fact that the hits are submitted, there should be some data in the mentioned table.Could you please enable WP Debug so that error messages are displayed? This will help us diagnose the issue more effectively. You can find detailed instructions on how to activate WP Debug at the following link: https://developer.www.ads-software.com/advanced-administration/debug/debug-wordpress/.
Please ensure you enable WP_DEBUG_DISPLAY as well.
Thank you!
Regards
Good Morning Matth?us
I have edit config.php.// Enable Debug logging to the /wp-content/debug.log file
define( ‘WP_DEBUG_LOG’, true );
// Enable display of errors and warnings
define( ‘WP_DEBUG_DISPLAY’, false );I had to disable WP_DEBUG_DISPLAY because a lot of warnings were issued by other plugins that I’m currently cleaning up.
The crucial error message for WP_Statistics is the following:
[28-Oct-2024 07:55:41 UTC] WordPress database error Unknown column ‘type’ in ‘where clause’ for query SELECT COUNT(*) FROMJlh8WI4a_statistics_pages
WHEREtype
= ” made by require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘plugins_loaded’), WP_Hook->do_action, WP_Hook->apply_filters, WP_Statistics->plugin_setup, WP_Statistics->includes, require_once(‘/plugins/wp-statistics/includes/class-wp-statistics-install.php’), WP_STATISTICS\Install->__construct, WP_STATISTICS\Install::init_page_type_updater, WP_STATISTICS\Install::is_require_update_page, WP_STATISTICS\Install::get_require_number_update
[28-Oct-2024 07:55:43 UTC] WordPress database error Unknown column ‘pages.type’ in ‘where clause’
for query SELECT SUM(count
) AScount
FROM Jlh8WI4a_statistics_pages AS pages WHERE pages.id = ‘290’ AND pages.type IN (‘page’) AND DATE(date) BETWEEN ‘2024-09-29’ AND ‘2024-10-28’ GROUP BY id made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/tiffany/page.php’), get_footer, locate_template, load_template, require_once(‘/themes/tiffany/footer.php’), wp_footer, do_action(‘wp_footer’), WP_Hook->do_action, WP_Hook->apply_filters, wp_admin_bar_render, do_action_ref_array(‘admin_bar_menu’), WP_Hook->do_action, WP_Hook->apply_filters, WP_STATISTICS\AdminBar->admin_bar, WP_Statistics\Models\ViewsModel->countViewsFromPagesOnly, WP_Statistics\Utils\Query->getVar[28-Oct-2024 07:55:44 UTC] WordPress database error Unknown column ‘type’ in ‘where clause’ for query SELECT
page_id
FROMJlh8WI4a_statistics_pages
WHEREdate
= ‘2024-10-28’ ANDuri
= ‘/wohnen/wohngebiet-friedrichshagen-ost/’ ANDtype
= ‘page’ ANDid
= 290 made by require(‘wp-blog-header.php’), wp, WP->main, WP->parse_request, do_action_ref_array(‘parse_request’), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WP_STATISTICS\Api\v2\Hit->hit_callback, WP_STATISTICS\Hits::record, WP_STATISTICS\Pages::record
[28-Oct-2024 07:55:44 UTC] WordPress database error Unknown column ‘type’ in ‘field list’ for query INSERT IGNORE INTOJlh8WI4a_statistics_pages
(uri
,date
,count
,id
,type
) VALUES (‘/wohnen/wohngebiet-friedrichshagen-ost/’, ‘2024-10-28’, 1, ‘290’, ‘page’) made by require(‘wp-blog-header.php’), wp, WP->main, WP->parse_request, do_action_ref_array(‘parse_request’), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WP_STATISTICS\Api\v2\Hit->hit_callback, WP_STATISTICS\Hits::record, WP_STATISTICS\Pages::record, WP_STATISTICS\Pages::save_page
[28-Oct-2024 07:55:44 UTC] [WP STATISTICS] [WARNING]: Unknown column ‘type’ in ‘field list’
[28-Oct-2024 07:55:44 UTC] WordPress database error Unknown column ‘type’ in ‘where clause’ for query SELECT page_id FROMJlh8WI4a_statistics_pages
WHEREtype
= ‘page’ andid
= 290 ORDER BY date DESC made by require(‘wp-blog-header.php’), wp, WP->main, WP->parse_request, do_action_ref_array(‘parse_request’), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WP_STATISTICS\Api\v2\Hit->hit_callback, WP_STATISTICS\Hits::record, WP_STATISTICS\Hits::recordOnline, WP_STATISTICS\UserOnline::record, WP_STATISTICS\UserOnline::update_user_online, WP_STATISTICS\Pages::getPageIdThe table
Jlh8WI4a_statistics_pages
exists and is empty- This reply was modified 3 weeks, 3 days ago by rubbeldiekatz.
Hi @rubbeldiekatz,
Thank you for sharing the errors!
We would appreciate it if you could kindly let us know where you encountered these errors.
Regards
Hi Matth?us
On the page https://berliner-baer-koepenick.de/wohnen/wohngebiet-hirschgarten/
[28-Oct-2024 12:31:13 UTC] WordPress database error Unknown column ‘type’ in ‘where clause’ for query SELECT COUNT(*) FROMJlh8WI4a_statistics_pages
WHEREtype
= ” made by require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘plugins_loaded’), WP_Hook->do_action, WP_Hook->apply_filters, WP_Statistics->plugin_setup, WP_Statistics->includes, require_once(‘/plugins/wp-statistics/includes/class-wp-statistics-install.php’), WP_STATISTICS\Install->__construct, WP_STATISTICS\Install::init_page_type_updater, WP_STATISTICS\Install::is_require_update_page, WP_STATISTICS\Install::get_require_number_update
[28-Oct-2024 12:31:14 UTC] WordPress database error Unknown column ‘pages.type’ in ‘where clause’ for query SELECT SUM(count
) AScount
FROM Jlh8WI4a_statistics_pages AS pages WHERE pages.id = ’64’ AND pages.type IN (‘page’) AND DATE(date) BETWEEN ‘2024-09-29’ AND ‘2024-10-28’ GROUP BY id made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/tiffany/page.php’), get_footer, locate_template, load_template, require_once(‘/themes/tiffany/footer.php’), wp_footer, do_action(‘wp_footer’), WP_Hook->do_action, WP_Hook->apply_filters, wp_admin_bar_render, do_action_ref_array(‘admin_bar_menu’), WP_Hook->do_action, WP_Hook->apply_filters, WP_STATISTICS\AdminBar->admin_bar, WP_Statistics\Models\ViewsModel->countViewsFromPagesOnly, WP_Statistics\Utils\Query->getVar[28-Oct-2024 12:31:15 UTC] WordPress database error Unknown column ‘type’ in ‘where clause’ for query SELECT
page_id
FROMJlh8WI4a_statistics_pages
WHEREdate
= ‘2024-10-28’ ANDuri
= ‘/wohnen/wohngebiet-hirschgarten/’ ANDtype
= ‘page’ ANDid
= 64 made by require(‘wp-blog-header.php’), wp, WP->main, WP->parse_request, do_action_ref_array(‘parse_request’), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WP_STATISTICS\Api\v2\Hit->hit_callback, WP_STATISTICS\Hits::record, WP_STATISTICS\Pages::record
[28-Oct-2024 12:31:15 UTC] WordPress database error Unknown column ‘type’ in ‘field list’ for query INSERT IGNORE INTOJlh8WI4a_statistics_pages
(uri
,date
,count
,id
,type
) VALUES (‘/wohnen/wohngebiet-hirschgarten/’, ‘2024-10-28′, 1, ’64’, ‘page’) made by require(‘wp-blog-header.php’), wp, WP->main, WP->parse_request, do_action_ref_array(‘parse_request’), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WP_STATISTICS\Api\v2\Hit->hit_callback, WP_STATISTICS\Hits::record, WP_STATISTICS\Pages::record, WP_STATISTICS\Pages::save_page
[28-Oct-2024 12:31:15 UTC] [WP STATISTICS] [WARNING]: Unknown column ‘type’ in ‘field list’
[28-Oct-2024 12:31:15 UTC] WordPress database error Unknown column ‘type’ in ‘where clause’ for query SELECT page_id FROMJlh8WI4a_statistics_pages
WHEREtype
= ‘page’ andid
= 64 ORDER BY date DESC made by require(‘wp-blog-header.php’), wp, WP->main, WP->parse_request, do_action_ref_array(‘parse_request’), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WP_STATISTICS\Api\v2\Hit->hit_callback, WP_STATISTICS\Hits::record, WP_STATISTICS\Hits::recordOnline, WP_STATISTICS\UserOnline::record, WP_STATISTICS\UserOnline::add_user_online, WP_STATISTICS\Pages::getPageId
that is current.Thank you @rubbeldiekatz, for providing the details!
I have forwarded this our development team for further investigation.
We will get back to you in a few days.
Thank you for your understanding and patience!
Regards
Thanks for the research. I am excited.
Best regards
Hi @rubbeldiekatz,
It appears that the “type” column is missing from the _statistics_pages table, which is causing this issue.
To resolve it, please run the following SQL command in your database to add the column:
ALTER TABLE Jlh8WI4a_statistics_pages ADD COLUMN type VARCHAR(180) AFTER id;
This should fix the error, and data should be recorded without any issues moving forward.
We would appreciate it if you could let us know the results.
Regards
Good Morning Matthew
Yes, it works now. Thank you very much for the help.
Have a nice day.
- You must be logged in to reply to this topic.