• Hi

    WP Statistics update v12.6.13 => 13.0.4 and A problem occurs
    my php-fpm version is 7.4

    “Problem Connect to WordPress RESET API”
    Image Link
    https://t1.daumcdn.net/cfile/tistory/994772345FCB8E9332

    After upgrading to “13.0.4”, attempted opcache flush and restarting php-fpm
    But it doesn’t solve the problem.

    Eventually i changed it to the “12.6.13” version.

    Best Regards,
    Hyunho

    • This topic was modified 3 years, 5 months ago by purityboy83.
Viewing 11 replies - 1 through 11 (of 11 total)
  • I can highly recommend only use the 12.6.13 version, the Version 13.0.4 looks still buggy

    Maybe this, from a Google search: “If you received an error, it means the WordPress Rest API is disabled. You can enable it by activating your permalinks in WordPress. Visit Settings ➜ Permalinks within WordPress and without making any changes click Save changes. This causes WordPress to flush its rewrite rules, and can often resolve issues like this.”

    But the REST API is platform dependent, and also it could be an authentication bug in the plugin.

    We had this error on one part of one chart only, and fixed it by setting memory higher. It was probably a different problem, but here is what happened: https://wordpress.org/support/topic/pages-top-page-trends-not-working/#post-13755604

    Thread Starter purityboy83

    (@purityboy83)

    Hi All

    1.Increased memory

    $ cat wp-config.php | grep 256
    define(‘WP_MEMORY_LIMIT’, ‘256M’);

    $ cat php.ini | grep 512 | grep -v “;”
    memory_limit = 512M

    and nginx restart

    sudo systemctl restart nginx

    =>> Same error occurs

    2. Permalinks

    I reseting Permalinks.

    Please refer to the image below
    https://t1.daumcdn.net/cfile/tistory/990EC53F5FCE65DE20

    https://t1.daumcdn.net/cfile/tistory/9942263F5FCE65DE25

    =>> Same error occurs

    3. Error Screenshot and log
    Error Screenshot
    https://t1.daumcdn.net/cfile/tistory/994772345FCB8E9332

    ======= Nginx log =======

    
    <skip....>
    2020/12/08 01:58:07 [notice] 16192#16192: *7 "^/([_0-9a-zA-Z-]+/)?core/modules/a095763a0d/(.*)" does not match "/wp-json/wp-statistics/v2/metabox", client: MY_PC_IP, server: mysite.com, request: "GET /wp-json/wp-statistics/v2/metabox?name=useronline&_=1607360285054 HTTP/1.1", host: "mysite.com", referrer: "http://mysite.com/wp-admin/admin.php?page=wps_overview_page"
    2020/12/08 01:58:07 [notice] 16192#16192: *7 "^/([_0-9a-zA-Z-]+/)?core/modules/067a15d05a/(.*)" does not match "/wp-json/wp-statistics/v2/metabox", client: MY_PC_IP, server: mysite.com, request: "GET /wp-json/wp-statistics/v2/metabox?name=useronline&_=1607360285054 HTTP/1.1", host: "mysite.com", referrer: "http://mysite.com/wp-admin/admin.php?page=wps_overview_page"
    2020/12/08 01:58:07 [notice] 16192#16192: *7 "^/([_0-9a-zA-Z-]+/)?core/modules/c4b8e124cf/(.*)" does not match "/wp-json/wp-statistics/v2/metabox", client: MY_PC_IP, server: mysite.com, request: "GET /wp-json/wp-statistics/v2/metabox?name=useronline&_=1607360285054 HTTP/1.1", host: "mysite.com", referrer: "http://mysite.com/wp-admin/admin.php?page=wps_overview_page"
    2020/12/08 01:58:07 [notice] 16192#16192: *7 "^/([_0-9a-zA-Z-]+/)?core/modules/(.*)" does not match "/wp-json/wp-statistics/v2/metabox", client: MY_PC_IP, server: mysite.com, request: "GET /wp-json/wp-statistics/v2/metabox?name=useronline&_=1607360285054 HTTP/1.1", host: "mysite.com", referrer: "http://mysite.com/wp-admin/admin.php?page=wps_overview_page"
    2020/12/08 01:58:07 [notice] 16192#16192: *7 "^/([_0-9a-zA-Z-]+/)?core/assets/00333ed422/(.*)" does not match "/wp-json/wp-statistics/v2/metabox", client: MY_PC_IP, server: mysite.com, request: "GET /wp-json/wp-statistics/v2/metabox?name=useronline&_=1607360285054 HTTP/1.1", host: "mysite.com", referrer: "http://mysite.com/wp-admin/admin.php?page=wps_overview_page"
    2020/12/08 01:58:07 [notice] 16192#16192: *7 "^/([_0-9a-zA-Z-]+/)?core/assets/6ca4266385/(.*)" does not match "/wp-json/wp-statistics/v2/metabox", client: MY_PC_IP, server: mysite.com, request: "GET /wp-json/wp-statistics/v2/metabox?name=useronline&_=1607360285054 HTTP/1.1", host: "mysite.com", referrer: "http://mysite.com/wp-admin/admin.php?page=wps_overview_page"
    2020/12/08 01:58:07 [notice] 16192#16192: *7 "^/([_0-9a-zA-Z-]+/)?core/assets/7d7d0964da/(.*)" does not match "/wp-json/wp-statistics/v2/metabox", client: MY_PC_IP, server: mysite.com, request: "GET /wp-json/wp-statistics/v2/metabox?name=useronline&_=1607360285054 HTTP/1.1", host: "mysite.com", referrer: "http://mysite.com/wp-admin/admin.php?page=wps_overview_page"
    2020/12/08 01:58:07 [notice] 16192#16192: *7 "^/([_0-9a-zA-Z-]+/)?core/assets/f1dfeb5569/(.*)" does not match "/wp-json/wp-statistics/v2/metabox", client: MY_PC_IP, server: mysite.com, request: "GET /wp-json/wp-statistics/v2/metabox?name=useronline&_=1607360285054 HTTP/1.1", host: "mysite.com", referrer: "http://mysite.com/wp-admin/admin.php?page=wps_overview_page"
    2020/12/08 01:58:07 [notice] 16192#16192: *7 "^/([_0-9a-zA-Z-]+/)?core/assets/(.*)" does not match "/wp-json/wp-statistics/v2/metabox", client: MY_PC_IP, server: mysite.com, request: "GET /wp-json/wp-statistics/v2/metabox?name=useronline&_=1607360285054 HTTP/1.1", host: "mysite.com", referrer: "http://mysite.com/wp-admin/admin.php?page=wps_overview_page"
    2020/12/08 01:58:07 [notice] 16192#16192: *7 "^/([_0-9a-zA-Z-]+/)?storage/(.*)" does not match "/wp-json/wp-statistics/v2/metabox", client: MY_PC_IP, server: mysite.com, request: "GET /wp-json/wp-statistics/v2/metabox?name=useronline&_=1607360285054 HTTP/1.1", host: "mysite.com", referrer: "http://mysite.com/wp-admin/admin.php?page=wps_overview_page"
    2020/12/08 01:58:07 [notice] 16192#16192: *7 "^/([_0-9a-zA-Z-]+/)?core/(.*)" does not match "/wp-json/wp-statistics/v2/metabox", client: MY_PC_IP, server: mysite.com, request: "GET /wp-json/wp-statistics/v2/metabox?name=useronline&_=1607360285054 HTTP/1.1", host: "mysite.com", referrer: "http://mysite.com/wp-admin/admin.php?page=wps_overview_page"
    2020/12/08 01:58:07 [notice] 16192#16192: *7 "^/([_0-9a-zA-Z-]+/)?lib/(.*)" does not match "/wp-json/wp-statistics/v2/metabox", client: MY_PC_IP, server: mysite.com, request: "GET /wp-json/wp-statistics/v2/metabox?name=useronline&_=1607360285054 HTTP/1.1", host: "mysite.com", referrer: "http://mysite.com/wp-admin/admin.php?page=wps_overview_page"
    2020/12/08 01:58:07 [notice] 16192#16192: *7 "^/([_0-9a-zA-Z-]+/)?comments/(.*)" does not match "/wp-json/wp-statistics/v2/metabox", client: MY_PC_IP, server: mysite.com, request: "GET /wp-json/wp-statistics/v2/metabox?name=useronline&_=1607360285054 HTTP/1.1", host: "mysite.com", referrer: "http://mysite.com/wp-admin/admin.php?page=wps_overview_page"
    <skip....>
    
    

    my system
    WordPress version 5.5.3
    WP Statistics version 13.0.4
    nginx version: nginx/1.19.3
    php : PHP 7.4.11

    Best Regards,
    Hyunho

    • This reply was modified 3 years, 5 months ago by Yui.
    • This reply was modified 3 years, 5 months ago by Yui. Reason: please use CODE button for proper formatting

    Difficult to debug. Wp-statistics does not meaningfully honor SCRIPT_DEBUG. As far as I can tell, so js is all minimized, and wp-statistics/assets/dev/javascript/meta-box.js is already compiled into wp-statistics/assets/js/admin.min.js when you download the plugin. For example modding meta-box.js to show more info on your error probably won’t work, like this:

    distrib:

    /**
     * Show Error Connection if Meta Box is Empty
     */
    wps_js.error_meta_box_data = function (text) {
        return wps_js._('rest_connect');
    };

    mod:

    wps_js.error_meta_box_data = function (text) {
        return wps_js._('rest_connect: ' + text);
    };

    Here ‘text’ is xhr.responseText from jquery.ajax(); and ‘rest_connect’ is the error you’re seeing, ‘Problem Connect to WordPress REST API‘.

    Wp-statistics is also one of those plugins *full* of cruft from composer, like redistributables full of testing code. For another kind of cruft, the plugin has two js functions for ajax calls in its files: its own ajaxQ(), which calls a jquery plugin function ajaxq(). Neither file is even used because their code ends up in admin.min.js before you get the plugin. Just whole trees of cruft.

    It’s not the only plugin that does this, and it presents two problems: 1. security surface, and 2. having to search through the bloat to fix things and verify files. I thought the whole purpose of composer was to control code, not to give up and invite the wilderness inside your house. But of course it’s easier to use it that way.

    For debugging I guess the first thing I would do is investigate the calls to check_ajax_referer( 'wp_rest', 'wps_nonce' ). They’re all in one file in the plugin, and WP core has a hook:
    do_action( 'check_ajax_referer', $action, $result );

    Hi @purityboy83 is Version 13.0.6 better for you, i’m asking before updateing 😉

    Thread Starter purityboy83

    (@purityboy83)

    Hi
    @leogc

    In fact, I am reluctant to update.
    Would it be scary?

    We plan to apply it to development or test sites first.

    However, the schedule was busy and cannot be test

    Best Regards,
    Hyunho

    So i am @purityboy83 please let me know if you had time to try it on testing servers. I don’t have one and i don’t like tzo crash my site again 😉

    Thread Starter purityboy83

    (@purityboy83)

    Hi
    @leogc

    If you have no problems using the “WP Statistics” plugin right now,

    Please delay the plugin’s update

    I have no time or plans to test it right now

    If I test plugin install, i will give you feedback on the result.

    Best Regards,
    Hyunho

    @purityboy83 thanks of course i will delay untill i know better 😉

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Problem Connect to WordPress RESET API(v13.0.4)’ is closed to new replies.