• Resolved pabloked

    (@pabloked)


    Hi guys,

    First, I’m sorry ebcause my english is not very good.

    Second, thank you for the plugin. It is the simplest and the best HTML cache plugin I tried.

    And last, I’ll try to explain the problem. I think you are using an option inside the file advanced-cache.php file named $settings[“permalink_trailing_slash”] that is not configurable from the settings page.

    When you install the plugin from scratch it works perfectly, but if you change something on the settings page, “permalink_trailing_slash” is automatically and hidden set to “true”, and I’m getting problems with some URLs I’m using with and slug like “bla-bla-bla.html”.

    Any idea?

    Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • So if I understand correctly everything works until you change a setting in the Cache Enabler settings page? Once a setting is changed what sort of error do you experience on pages which don’t end with a trailing slash?

    Also what permalink settings do you have defined?

    Thread Starter pabloked

    (@pabloked)

    Yes, I’m sorry, I’ll try to explain better.

    After make some tests, this is what is happening to me.

    1. Install the plugin from scratch

    2. Everything is caching correctly

    3. Then, in the plugin configuration page, for example, check the option “Pre-compression of cached pages.”

    4. Open any page to create the cache

    5. It is creates the file “cache-enabler-advcache-sitename.settings” under /wp-content/cache/ and the conetent of this file is:

    <?php $settings = array (
    ‘permalink_trailing_slash’ => true,
    0 => ‘expires’,
    );

    * The setting ‘permalink_trailing_slash’ is the option I don’t know where comes from.

    The problem is, I have some URLs with an slash “/” at the end, and other URLs end with “.html”

    I hope I’m explaining better.

    Thank you again!

    Thread Starter pabloked

    (@pabloked)

    I forgot to say, the option permalink_trailing_slash then is used inside advanced-cache.php and returning false because my products and posts have an slug ending with “.html”

    Which permalink structure are you using for your site?

    Thread Starter pabloked

    (@pabloked)

    This is my website: https://barbatia.es

    And I’m using for permalinks the pro edition of this plugin: https://ww.wp.xz.cn/plugins/permalink-manager/

    Thread Starter pabloked

    (@pabloked)

    But now I have the problem fixed. I have commented the following lines inside “advanced-cache.php”:

    // check if we need drop the ball to cause a redirect
    /*if ( isset($settings[“permalink_trailing_slash”]) ) {
    if ( ! preg_match(“/\/$/”, $_SERVER[“REQUEST_URI”]) ) {
    return false;
    }
    }*/

    Thread Starter pabloked

    (@pabloked)

    mmmm no, I haven’t fixed it. The file “advanced-cache.php” has any kind of regeneration and replace it with a new one and removes my commenting lines.

    Thread Starter pabloked

    (@pabloked)

    Ok, I fixed it.

    I’m using the plugin I told you to manage permalinks and I forgot the options Settings -> Permalinks -> Common settings

    And I had configured (but not using it because the permalink manager pro plugin) the post name “https://barbatia.es/sample-post/&#8221; with a trailling slash at the end.

    I’m sorry for the inconvenience and thank you again for the plugin.

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

The topic ‘Problem with the permalink trailing slashes’ is closed to new replies.