• Resolved ZappoB

    (@zappob)


    Hi

    the Message “WP Statistics Notice: The cache plugin WordPress Object Cache is detected, please make sure the /wp-content/plugins/wp-statistics/assets/js/tracker.js file is excluded from file optimization and caching, Click here for more info.” comes back every time a new page in the backend is loaded.

    How can the message be disabled permanently?

    Also, please include LiteSpeed-Cache-Settings in your tutorial.

    BR, Joerg

Viewing 12 replies - 1 through 12 (of 12 total)
  • Mehmet

    (@gandomi)

    Hello Joerg,

    Thank you for your message and your suggestion about updating the documentation.
    We have updated the documentation to include the LiteSpeed Cache settings as requested.

    To disable the notice permanently, please follow these steps:
    Go to LiteSpeed Cache > Page Optimization, then open the Tuning tab.
    In the JS Excludes field, add this line:
    /wp-content/plugins/wp-statistics/assets/js/tracker.js

    After adding this, the message should no longer appear when you load new pages in the backend.

    If you have any further questions, feel free to ask.

    Best regards,
    Mehmet

    Thread Starter ZappoB

    (@zappob)

    Hallo Mehmet,

    thanks for your fast reply, I managed to exclude the tracker.js already, but the message still keeps appearing even using your suggested complete string – I just used only “wp-statistics/assets/js/tracker.js” in “JS Excludes”, JS Deferred / Delayed Excludes” and “Guest Mode JS Excludes”. I checked it in the developer tools of the browser, that the tracker.js is correctly excluded.

    Any further suggestions how to get rid of the message is highly appreciated.

    BR, Joerg

    Mehmet

    (@gandomi)

    Hi Joerg,

    Thank you for your message and for the detailed follow-up.

    You’re absolutely right, this notice should disappear after dismissing it and excluding the mentioned file from your cache settings.

    The fact that it keeps reappearing, even after confirming the exclusion and clicking the “X”, is not expected behavior.
    This might indicate an issue with how admin notices are being handled in your site’s setup.

    In some cases, WordPress may fail to store the dismissal properly in the database, which prevents the notice from staying hidden.

    If possible, please check whether there are any PHP error messages or warnings in your site’s logs that might be related to this.
    That can help us better understand what’s happening behind the scenes.

    We appreciate your patience, and we’re here to help get this resolved as smoothly as possible.

    Best regards,
    Mehmet

    Thread Starter ZappoB

    (@zappob)

    Hi Mehmet,

    I couldn’t find any related errors in the error.log, nor the WooCommerce reports. Also, the browser console didn’t state anything.

    Should there be anything stored in the database which I can look up?

    BR, Joerg

    Hi Joerg,

    Thank you for your follow-up.

    Please navigate to:
    Statistics > Settings > Display Options
    Then enable the option:
    “Disable Inactive Essential Feature Notices.”

    This will help suppress the related notices.

    Additionally, if you’re looking for any stored data regarding these notices in the database,
    they are saved under the option name:
    wp_statistics_notifications
    in the wp_options table.

    Let me know if you need any further assistance.

    Best regards,

    Thread Starter ZappoB

    (@zappob)

    Hi Mehmet,

    the workaround “Disable Inactive Essential Feature Notices.” did its job, but it’s really only a workaround.

    The field wp_statistics_notifications does contain a long string, but what should I look for?

    BR, Joerg

    Hi Joerg,

    Thank you for your reply,

    The correct database option that stores dismissed messages is:

    wp_statistics_dismissed_notices

    This field keeps a list of which admin notices have been hidden.
    For example, it might look like this:

    a:2:{i:0;s:22:"cloudflare_geolocation";i:1;s:20:"share_anonymous_data";}

    Each item is the ID of a message that was dismissed.

    If the cache notice is still showing up, it’s possible that its ID is not listed there.
    To fix it, you can:

    1. Go to your database (via phpMyAdmin or a database plugin).
    2. Find the wp_statistics_dismissed_notices row in the wp_options table.
    3. Edit the value and make sure the notice ID is included.

    Best regards,
    Mehmet

    Thread Starter ZappoB

    (@zappob)

    Hi Mehmet,

    thank you for this information, but it’s essential to know the ID of this message – what I don’t.

    Can you supply this ID? And I really hope, that you address this in a future update.

    Nevertheless: I don’t want to sound ungrateful, many thanks for the great plugin!

    BR, Joerg

    Hi Joerg,

    Thank you for your kind message and valuable feedback.

    The ID of the message you mentioned is:
    wordpressobjectcache_cache_plugin_detected

    For example, if I remove this value from the wp_statistics_dismissed_notices option:
    a:1:{i:0;s:42:"wordpressobjectcache_cache_plugin_detected";}
    the notice will appear again.

    We appreciate you bringing this up, and I want to assure you that we’re currently working on improving this behavior in a future update.

    Thanks again for your support and for using our plugin!

    Best regards,
    Mehmet

    Thread Starter ZappoB

    (@zappob)

    Hi Mehmet,

    JFYI: I tried your example in the named field as the one and only entry, notification still appears.

    Best regards
    Joerg

    PS: If I delete all entries in the field, this error occurs and no site will load – please make sure, that this query is more error-tolerant:

    Uncaught Error: in_array(): Argument #2 ($haystack) must be of type array, string given
    in /home/mywlande/public_html/wp-shop_test/wp-content/plugins/wp-statistics/src/Service/Admin/NoticeHandler/Notice.php on line 61

    Call stack:

    1. in_array()
      wp-content/plugins/wp-statistics/src/Service/Admin/NoticeHandler/Notice.php:61
    2. WP_Statistics\S\A\N\Notice::displayNotices()
      wp-includes/class-wp-hook.php:324
    3. WP_Hook::apply_filters()
      wp-includes/class-wp-hook.php:348
    4. WP_Hook::do_action()
      wp-includes/plugin.php:517
    5. do_action()
      wp-admin/admin-header.php:313
    6. require_once('/home/mywlande/publi...min/admin-header.php')
      wp-admin/index.php:137

    Query Monitor

    Thread Starter ZappoB

    (@zappob)

    Hi Mehmet,

    the new update fixed the reoccurring message, many thanks for addressing it.

    Best regards
    Joerg.

    Hi Joerg,

    I’m glad to hear the latest update resolved the issue.
    Thank you for your patience and for sharing your feedback throughout the process.

    Best regards,
    Mehmet

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘WP Statistics Notice is persistent’ is closed to new replies.