Traffic by title (all time) – Only items are not displayed.
-
Hi
All other indicators are displayed
But only “Traffic by title (all time)” is not displayed.Ref img.
https://ibb.co/5cD3bJRVersions is 3.7(latest)
PHP 8.0.xThere is no error log in nginx or pfp-fpm.
thanks
-
Hello,
This is strange!
Could you please check again?Hi
@osamaeshHow do I check again?
The problem remains the same.
Please tell me how to tracking
Let’s check.Thanks
HI
Is the related DB table “ahc_title_traffic” correct?
CREATE TABLE ahc_title_traffic ( til_id int unsigned NOT NULL AUTO_INCREMENT, til_page_id varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, til_page_title varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, til_hits int unsigned NOT NULL, PRIMARY KEY (til_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ciIs there any problem with the table structure?
The data seems to be there.
Ref img
https://ibb.co/Gpwvv6GADD
Something was confirmed in the log.
Can you please check this part?
stderr: “NOTICE: PHP message: PHP Warning: Undefined variable $sql2 in …/wp-content/plugins/visitors-traffic-real-time-statistics/functions.php on line 2516”
stderr: “NOTICE: PHP message: PHP Warning: foreach() argument must be of type array|object, null given in …/wp-content/plugins/visitors-traffic-real-time-statistics/functions.php on line 2524”
Thanks
Hi
visitors-traffic-real-time-statistics/functions.php
line 2502
$sql2 query is
SELECT til_page_id, til_page_title, til_hits FROM ahc_title_traffic where 1=1 $cond GROUP BY til_page_id ORDER BY til_hits DESC limit %d, %derror is
Error Code: 1055. Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘ahc_title_traffic.til_page_title’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_byIn mysql8 version, sql error occurs due to group by syntax.
That sql doesn’t match the syntax
I think it needs correction.All columns described in the select clause must be described in the group by clause.
I think the query should be modified as below.
SELECT til_page_id, til_page_title, til_hits FROM ahc_title_traffic where 1=1 $cond GROUP BY til_page_id, til_page_title, til_hits ORDER BY til_hits DESC limit %d, %dthanks
-
This reply was modified 4 years, 6 months ago by
purityboy83.
Thanks a lot @purityboy83 for providing this valuable information.
We will check and fix this issue within the next few hours, and you will receive an updateThank you
Hi
First, Thank you for help
As you know, queries in other places also seem to be subject to the limitations of MySQL 8.0 sql_mode.
if($cnt==true) { $sql2 = "SELECT sum(cnt) from (SELECT count(*) as cnt FROM ahc_title_traffic where 1=1 $cond GROUP BY til_page_id ORDER BY til_hits DESC) as res"; $count = $wpdb->get_var($sql2); return $count; }Error Code: 1055. Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column ‘ahc_title_traffic.til_hits’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Thanks
Thank you,
We will test the plugin with MySQL 8.0 sql_mode and back to you soonmany thanks
We would like to test the plugin on your environment,
We will need temporary access to your website dashboard. If this suits you, please get in touch with us at wp@wp-buy.comThank you
Hi
I sent you a mail.
Thanks
hello,
thank you,
kindly update to the latest version and try againHi
Error occur
child 15061 said into stderr: "NOTICE: PHP message: do_action('wp_ajax_traffic_by_title'), WP_Hook->do_action, WP_Hook->apply_filters, ahcfree_traffic_by_title_callback, ahcfree_get_traffic_by_titleμ΄(κ°) SELECT til_page_id, til_page_title, til_hits " child 15061 said into stderr: " FROM ahc_title_traffic where 1=1 " child 15061 said into stderr: " GROUP BY til_page_id , til_page_title, til_hits" child 15061 said into stderr: " ORDER BY til_hits DESC limit %d, %d WordPress database error in query You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%d, %d' at line 4" child 15061 said into stderr: "NOTICE: PHP message: PHP Warning: Attempt to read property "num_rows" on array in .../wp-content/plugins/visitors-traffic-real-time-statistics/functions.php on line 2500"thanks
Solved π
Hi
Now the “Traffic by title (all time)” indicator is starting to show.
Thank you so much~!!When I check the log, it seems that a minor warning is recorded.
ARNING: said into stderr: “NOTICE: PHP message: PHP Warning: Attempt to read property “num_rows” on array in …/wp-content/plugins/visitors-traffic-real-time-statistics/functions.php on line 2501″
My PHP Version is 8.0.x
Thanks~!!
Thanks, @purityboy83
Yes, we resolved this error. Please clear the error log and tryHi
@osamaeshIs the plugin updated right?
The version seems to be the same (3.9)
However, I deleted the old plugin and reinstalled it.
But I still get the error.
said into stderr: "NOTICE: PHP message: PHP Warning: Attempt to read property "num_rows" on array in ..../wp-content/plugins/visitors-traffic-real-time-statistics/functions.php on line 2501Thanks
-
This reply was modified 4 years, 6 months ago by
The topic ‘Traffic by title (all time) – Only items are not displayed.’ is closed to new replies.