• Resolved hitty

    (@hitty)


    With plugin enabled:
    If you make a form request on the page, then the main one will be displayed. If you go to this URL without a post-request, the desired page will be displayed
    With plugin disabled:
    Everything works without problems. Exactly the page that is needed is displayed.

    What could be the problem? How I can disable plugin only for form post requests?

    Thanks for the help!

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    The plugin shouldn’t be showing a cached page for a POST request. Enable the debug log for your IP and POST again and check what the plugin does. It should say it’s not using the cache.

    Thread Starter hitty

    (@hitty)

    17:34:02 22758 wpsc_is_caching_user_disabled: false
    17:34:02 22758 Supercache Late Init: add wp_cache_serve_cache_file to init
    17:34:02 22758 Supercache Late Loader running on init
    17:34:02 22758 wp_cache_get_cookies_values: return:
    17:34:02 22758 supercache dir: ABSPATH/wp-content/cache/supercache/geriartriya.ru/
    17:34:02 22758 wp_cache_get_cookies_values: return:
    17:34:02 22758 Fetched static page data from supercache file using PHP. File: ABSPATH/wp-content/cache/supercache/geriartriya.ru/index-https.html
    17:34:02 22758 wp_cache_serve_cache_file: checking age of cached vs served files.
    17:34:02 22758 wp_cache_serve_cache_file: 304 browser caching not possible as timestamps differ.

    • This reply was modified 3 years ago by hitty.
    Thread Starter hitty

    (@hitty)

    And this is mainpage content, but URL is not mainpage
    https://www.dropbox.com/s/1hh1vi5p5nyjdca/Screenshot%202023-05-23%20at%2020.33.16.png?dl=0

    When plugin disabled all works fine,

    • This reply was modified 3 years ago by hitty.
    • This reply was modified 3 years ago by hitty.
    • This reply was modified 3 years ago by hitty.
    • This reply was modified 3 years ago by hitty.
    • This reply was modified 3 years ago by hitty.
    Thread Starter hitty

    (@hitty)

    @donncha the problem is still there. Can you help me?

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    Was that debug log from a request for the main page? If not, then what URL was it? Was it the POSTing to https://geriartriya.ru/rg/simferopol/chastnye-pansionaty-simferopol ? There’s definitely something up with your server then. Line 125 of wp-cache-phase1.php will stop the plugin serving a cached page to a POST request.

    if ( ! $cache_enabled || ( isset( $_SERVER['REQUEST_METHOD'] ) && in_array( $_SERVER['REQUEST_METHOD'], array( 'POST', 'PUT', 'DELETE' ) ) ) || isset( $_GET['customize_changeset_uuid'] ) ) {
        return true;
    }

    Do you have some sort of proxy running that might interfere with the real URL seen by WordPress?

    Thread Starter hitty

    (@hitty)

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    If that line is returning true then it can’t be serving a cached file as the file is served by the function wp_cache_serve_cache_file() that is called afterwards in wp-cache-phase1.php

    I’m sorry, I don’t know why this happens on your site. You could go into the get_current_url_supercache_dir function and examine what directory it returns. Use error_log() and examine your PHP error_log. Maybe you’ll find something there that will help.

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

The topic ‘Wrong page shown on post request’ is closed to new replies.