• Resolved vimana

    (@vimana)


    Hello,

    I recently updated the WP-Optimize plugin to version 3.50 and encountered a significant issue. After the update, I started experiencing problems related to the template_redirect hook in WordPress. This conflict caused enough disruption that I felt compelled to revert to the previous version of the plugin.

    Could anyone provide insights on whether this is a known issue with the 3.50 update? Additionally, if there are any suggested fixes or workarounds, I would greatly appreciate learning about them. I hope to resolve this so I can utilize the latest version of the plugin.

    Thank you in advance for your assistance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support wpmansour

    (@wpmansour)

    Hello @vimana,

    I’m sorry to hear that you’re having trouble with the template_redirect hook after updating to WP-Optimize version 3.50. While this isn’t a widely reported issue, it’s possible that it’s related to your specific setup.

    A few things could be causing this:

    First, clearing any cached data (such as page cache, object cache, or even a CDN cache) might help. Sometimes old cache can interfere with new updates, so it’s a good idea to start fresh.

    Additionally, have you added any custom code or modifications that hook into template_redirect in your theme or plugins? If you have, trying to temporarily remove or comment out that code could help us determine if it’s related to the issue.

    To dig a little deeper, it would be really helpful if you could share your site’s health information. This will give us a clearer picture of your current setup, including any active plugins, themes, or other factors that might be at play.

    Here’s how you can do that:

    1. Go to your WordPress dashboard.
    2. Navigate to Tools > Site Health.
    3. Click on the Info tab at the top.
    4. At the bottom of the Info tab, click Copy site info to clipboard.
    5. Paste the copied information into a service like Pastebin and share the link with us here.

    This information will allow us to identify any conflicts or issues that might be causing the problem with the template_redirect hook.

    Best Regards,

    Thread Starter vimana

    (@vimana)

    Thank you for the continued support. I would like to clarify that our issue is not directly related to the template_redirect hook as initially suspected, but rather to how URL redirections are being handled in the latest plugin update.

    Issue Details:

    • Redirection Behavior: After updating WP-Optimize to version 3.50, the plugin now forcibly redirects URLs to include a trailing slash. For example:
      • From www.mysite.com/beers/bavaria to www.mysite.com/beers/bavaria/
      • From www.mysite.com/beers/bavaria.html to www.mysite.com/beers/bavaria/.html
    • Existing Setup and SEO Concerns: Our site has several pages indexed without the trailing slash because including it previously caused layout conflicts. For SEO purposes and to maintain consistent indexing, it is crucial for us to preserve the URLs without the trailing slash.
    • Conflict and Loop Creation: We have custom scripts set to redirect any access from a URL with a trailing slash back to the URL without it. This setup in the presence of the new plugin behavior creates a redirect loop, resulting in the ERR_TOO_MANY_REDIRECTS error visible in the browser.
    • Diagnostic Confirmation: I have confirmed via the browser’s F12 console tools that www.mysite.com/beers/bavaria is indeed being redirected by WP-Optimize to www.mysite.com/beers/bavaria/, and then immediately redirected back by our script to www.mysite.com/beers/bavaria, thus creating an endless loop.
    • Specific Update and Settings Issue: This issue has arisen specifically with the update to version 3.50 and is apparent when the “Process JavaScript files” option under “Enable Minify” is enabled. This was not an issue in previous versions. “Process HTML” or “Process CSS files” doesn’t cause the same problem.

    Could you please advise on how we might resolve this conflict without sacrificing our SEO setup or site functionality? Any guidance on adjusting the WP-Optimize settings or a potential patch would be greatly appreciated.

    Thank you for the great plugin and for looking into this matter.

    Plugin Support vupdraft

    (@vupdraft)

    Hi,

    Would you be able to provide your site URL so we can observe the behaviour (you can do a temporary paste using a tool such as pastebin.com which you can then remove)

    If you deactivate WPO where do the redirects go?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.