• Resolved purityboy83

    (@purityboy83)


    Hi

    All other indicators are displayed
    But only “Traffic by title (all time)” is not displayed.

    Ref img.
    https://ibb.co/5cD3bJR

    Versions is 3.7(latest)
    PHP 8.0.x

    There is no error log in nginx or pfp-fpm.

    thanks

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author osama.esh

    (@osamaesh)

    Hello,
    This is strange!
    Could you please check again?

    Thread Starter purityboy83

    (@purityboy83)

    Hi
    @osamaesh

    How do I check again?

    The problem remains the same.

    Please tell me how to tracking
    Let’s check.

    Thanks

    Thread Starter purityboy83

    (@purityboy83)

    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_ci

    Is there any problem with the table structure?

    The data seems to be there.
    Ref img
    https://ibb.co/Gpwvv6G

    ADD

    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

    Thread Starter purityboy83

    (@purityboy83)

    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, %d

    error 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_by

    In 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, %d

    thanks

    • This reply was modified 3 years, 5 months ago by purityboy83.
    Plugin Author osama.esh

    (@osamaesh)

    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 update

    Thank you

    Thread Starter purityboy83

    (@purityboy83)

    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

    Plugin Author osama.esh

    (@osamaesh)

    Thank you,
    We will test the plugin with MySQL 8.0 sql_mode and back to you soon

    many thanks

    Plugin Author osama.esh

    (@osamaesh)

    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 [email protected]

    Thank you

    Thread Starter purityboy83

    (@purityboy83)

    Hi

    I sent you a mail.

    Thanks

    Plugin Author osama.esh

    (@osamaesh)

    hello,
    thank you,
    kindly update to the latest version and try again

    Thread Starter purityboy83

    (@purityboy83)

    Hi

    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

    Plugin Author osama.esh

    (@osamaesh)

    Solved ??

    Thread Starter purityboy83

    (@purityboy83)

    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~!!

    Plugin Author osama.esh

    (@osamaesh)

    Thanks, @purityboy83
    Yes, we resolved this error. Please clear the error log and try

    Thread Starter purityboy83

    (@purityboy83)

    Hi
    @osamaesh

    Is 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 2501

    Thanks

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Traffic by title (all time) – Only items are not displayed.’ is closed to new replies.