• Hi Marko,

    I hope you’re doing well! I’ve found this in my debug.log –

    PHP Notice: Function amp_is_available was called incorrectly. amp_is_available() (or amp_is_request(), formerly is_amp_endpoint()) was called too early and so it will not work properly. WordPress is currently doing the w3tc_footer_comment hook. Calling this function before the wp action means it will not have access to WP_Query and the queried object to determine if it is an AMP response, thus neither the amp_skip_post() filter nor the AMP enabled toggle will be considered. It appears the plugin with slug w3-total-cache is responsible; please contact the author. Please see Debugging in WordPress for more information. (This message was added in version 2.0.0.) in x/wp-includes/functions.php on line 5833

    WP 6.0.3, PHP 8.0.26, official AMP plugin (using ?amp=1), W3TC AMP extension (query string, postfix “amp”)

    Did add amp as accepted query string on the site, as you adviced here.

    Thanks for your help,

    eC

    The page I need help with: [log in to see the link]

Viewing 2 replies - 16 through 17 (of 17 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @ecronik

    First of all, sorry for the late reply.
    Regarding your question about the TTL, this is a trial-and-error process. So you need to check and try and see how this behaves in your environment.

    As for the error messages, can you please let me know if those are now fixed for you?

    Thanks!

    Thread Starter ecronik

    (@ecronik)

    Hi @vmarko

    No, the error messages still occur. Also, occasionally this one with changing filenames:

    [09-Feb-2023 16:38:37 UTC] PHP Warning: filesize(): stat failed for /…/wp-content/cache/object/d2f/438/d2f43839d111e37ad033f85d8dee5f63.php in /…/wp-content/plugins/w3-total-cache/Cache_File.php on line 159

    All plugins etc. up-to-date.

    Unfortunately, I also haven’t managed to fix the admin-ajax.php error after a while when using load-more buttons etc. I tried excluding jquery.min.js and tagdiv_theme.min.js from RocketLoader, excluding admin-ajax.php from page cache, had HTML/XML TTL already down at 15 minutes, but still no luck. Maybe you have another idea about this as well?

    Thanks,

    eC

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘AMP PHP error’ is closed to new replies.