• Resolved 7887word7887

    (@7887word7887)


    Hi, I installed this plugin 2 days ago.

    Now I am trying to publish new blog post, I am getting server errors.
    Blog post is getting published after getting 500 error. It looks like cache purge for specific page is not working. Also new published blog post(after 500 error) is not showing because cache is not purged.

    HTTP request:

    POST mysite.tld/wp-admin/post.php?post=x&action=edit&meta-box-loader=1&meta-box-loader-nonce=xxxx&_locale=user

    Response:
    {“code”:”internal_server_error”,”message”:”
    There has been a critical error on this website.<\/p>
    Learn more about troubleshooting WordPress.<\/a><\/p>”,”data”:{“status”:500},”additional_errors”:[]}

    Following things are noted:

    1. no other page caching plugin installed neither server-level page caching system installed
    2. no page rules
    3. not using official Cloudflare plugin
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter 7887word7887

    (@7887word7887)

    Hi,

    Also getting 500 response when clicked on Test cache

    POST mysite.tld/wp-admin/admin-ajax.php
    action=swcfpc_test_page_cache&security=xxxx

    Response headers:

    Alt-Svc: h3=”:443″; ma=86400, h3-29=”:443″; ma=86400
    Cache-Control: no-store, no-cache, must-revalidate, max-age=0
    Cf-Cache-Status:DYNAMIC
    Date: Thu, 25 May 2023 11:58:11 GMT
    Expires: Thu, 25 May 2023 11:58:11 GMT
    X-Wp-Cf-Super-Cache: no-cache
    X-Wp-Cf-Super-Cache-Cache-Control: no-store, no-cache, must-revalidate, max-age=0

    Response code: 500
    Response body: empty


    Plugin Contributor iSaumya

    (@isaumya)

    Hi @7887word7887,
    Error 500, generally means Fatal Error which is happening when you are doing the ajax requests. Please check the PHP error log to see if any fatal errors are reported there.

    Thread Starter 7887word7887

    (@7887word7887)

    Hi @isaumya ,

    Please check the following log

    [Sat May 27 00:18:38.082446 2023] [proxy_fcgi:error] [pid 1:tid 1] [client x.x.x.x:44710] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function error_log() in /home/users/HIDDEN/www/wp-content/plugins/wp-cloudflare-page-cache/libs/logs.class.php:77\nStack trace:\n#0 /home/users/HIDDEN/www/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php(2568): SWCFPC_Logs->add_log()\n#1 /home/users/HIDDEN/www/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php(767): SWCFPC_Cache_Controller->purge_cache_queue_write()\n#2 /home/users/HIDDEN/www/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php(1022): SWCFPC_Cache_Controller->purge_urls()\n#3 /home/users/HIDDEN/www/wp-includes/class-wp-hook.php(308): SWCFPC_Cache_Controller->purge_cache_on_post_edit()\n#4 /home/users/HIDDEN/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()\n#5 /home/users/HIDDEN/www/wp-includes/plugin.php(517): WP_Hook->do_action()\n#6 /home/users/HIDDEN/www/…', referer: https://mysite.tld/wp-admin/edit.php

    Edit:

    PHP version : PHP 8.1.2
    WordPress version: 6.2.2

    No other cache plugin installed.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @7887word7887,
    This is super wired. The error_log() is a native PHP function: https://www.php.net/manual/en/function.error-log.php – how can it be an undefined function? Please check if this function is disabled in your PHP setup.

    Thread Starter 7887word7887

    (@7887word7887)

    Hi @isaumya ,

    My bad, error_log was disabled by admin.
    Now error_log removed from the function disable list and working like pro.


    Thanks for the prompt response.

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

The topic ‘Error while publishing/updating posts’ is closed to new replies.