• Resolved lechon

    (@lechon)


    With the newest update the plugin broke my site.

    Upon update and then trying to go to settings it blocked me from using WordPress administration. Via FTP I was able to disable and gain access again.

    Tried to reinstall and this time it did worked but with a major problem for my site.

    We use mod_rewrite to fix a particular path on my site where it converts uppercase characters on an URL to lower case (this is from an old website that we have migrated).

    So the old URL looks like this:

    https://www.mysite.com/ANIMALS/cow

    And the mod_rewrite rule we have converts it to:

    https://www.mysite.com/animals/cow

    This mod_rewrite still works and the URL resolves, but the Plugin 404 to 301 reports it on the error logs as a 404. So the logs fills with hundreds of 404s.

    I had to deactivated the plugin for now. Before this update it was working great for us.

    We also have other settings in our mod_rewrite rules like fixing extra spaces in incoming URLs. Those too are working fine but the Plugin 404 to 301 reports it on the error logs as a 404 as well.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Joel James

    (@joelcj91)

    Hey @lechon,

    The settings page link is changed in the new version, so if you are visiting the old settings page, it will show an error.

    Regarding the redirects, this plugin redirects only when the WordPress is_404() conditional check returns true. It is was like that in the previous version too. I will check this and update you. Meanwhile, can you share your .htaccess rules and PHP version?

    Thread Starter lechon

    (@lechon)

    Hi Joel,

    So you know I am not using this plugin to redirect anything and I am just using it as reporting 404 tool.

    Here is the information:

    PHP Version 7.1.18

    This is just a sample from the .htaccess

    #Rewrite ANIMALS to animals
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !^/ANIMALS/
    RewriteCond %{REQUEST_URI} ^/([animals\>\<_\s\+\ ]|%[A-Z0-9]{2,2})+/ [NC]
    RewriteRule ^[^/]+/(.*)$ videos/$1 [R=301,L,DPI,NC]

    #auto-correct errant characters from URLs spaces and any encoded symbols
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} ^[/]([videos\s>\+\ ]|%[A-Z0-9]{2,2}){6,} [NC]
    RewriteRule ^(.*)(?:[^a-zA-Z0-9/_-]|%[A-Z0-9]{2,2})+(.*)$ $1$2 [NC,L,R=301,DPI]

    Plugin Author Joel James

    (@joelcj91)

    Thanks. Will look into this.

    Plugin Author Joel James

    (@joelcj91)

    Hi @lechon,

    I believe you have FTP access to edit your files. Can you open public/class-jj4t3-404-actions.php then edit line #95 and change the hook name from wp to template_redirect? Your line #95 should look like,
    add_filter( 'template_redirect', array( $this, 'handle_404' ) );
    after editing.

    Let me know if this patch works.

    • This reply was modified 6 years, 8 months ago by Joel James.
    • This reply was modified 6 years, 8 months ago by Joel James.
    Thread Starter lechon

    (@lechon)

    Hi @joelcj91

    It worked!
    Many thanks!

    So what happens next time there is an update on the plugin? Do I need to always change that line of code?

    Plugin Author Joel James

    (@joelcj91)

    Thank you. No need to worry about that. I will be including this fix in next release ??

    Thread Starter lechon

    (@lechon)

    Many thanks Joel.

    Cheers!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Newest Update 3.0 Broke My Site’ is closed to new replies.