• Well, that’s it.

    When I’m logged in and ?swcfpc=1 is added to the URL, the front page downloads instead of loading. This is what the download file dontains:

    <?php
    /**
     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     *
     * @package WordPress
     */
    
    /**
     * Tells WordPress to load the WordPress theme and output it.
     *
     * @var bool
     */
    define( 'WP_USE_THEMES', true );
    
    /** Loads the WordPress Environment and Template */
    require __DIR__ . '/wp-blog-header.php';

    Any other page loads fine, it happens only for the index page.

    Can it have something to do with the plugin?

    If I load the index without ?swcfpc=1, there are no issues. Also, if I’m not logged in. It only happens when I log in.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter RobotFX

    (@wattaman)

    PS enabling the WP debug doesn’t show anything pointing to the plugin:

    [09-Apr-2023 17:11:02 UTC] PHP Deprecated:  rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/domain.org/html/wp-includes/formatting.php on line 2786
    [09-Apr-2023 17:11:02 UTC] PHP Deprecated:  strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/domain.org/html/wp-includes/functions.php on line 7053
    [09-Apr-2023 17:11:02 UTC] PHP Deprecated:  str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/domain.org/html/wp-includes/functions.php on line 2165

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @wattaman,
    I don’t see how adding that query string will download the webpage. You can add any query string e.g. ?foo=bar and see what happens.

    Besides if you are using the latest version of the plugin, I will suggest you to stop using the ?swcfpc=1 cache buster query param, as now there is a way to actually do it. Checkout the implementation guide: https://gist.github.com/isaumya/af10e4855ac83156cc210b7148135fa2

    Thread Starter RobotFX

    (@wattaman)

    Thanks, I’ll try that

    Thread Starter RobotFX

    (@wattaman)

    Unfortunately, it is not working, although the issue is a little different and does not necessarily apply to ?swcfpc=1

    With caching enabled, ANY 404 page results in that file being downloaded rather the loading in the browser. As soon as I disable caching, there are no issues with loading the 404 pages. Also, it only seems to happen when I am logged in.

    I’ve added the following to the theme 404 page, for some extra safety:

    header("HTTP/1.1 301 Moved Permanently");
    header("Location: ".get_bloginfo('url'));
    exit();
    Plugin Contributor iSaumya

    (@isaumya)

    Hi,
    That is so wired. I have not seen such issue before. Are you sure it is not some issue with the nginx rule or server config? Personally never seen that problem.

    Thread Starter RobotFX

    (@wattaman)

    Strange indeed. Fortunately it happens only for the admin (I believe).

    Anyhow, I cannot find the Ignore query string order on Cloudflare. Has it been renamed to Enable query string sort? And should it be enabled or disabled now?

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @wattaman,
    I also did not find any option named Ignore query string order inside any Cloudflare settings page. But there is Enable query string sort which does cause some issues with some eCommerce plugins like EDD which requires the query params not to be sorted.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Index page downloads instead of opening in the browser’ is closed to new replies.