• Resolved Vlad Kobrenko

    (@kobrenko)


    Hello! I ran into the following problem and I will be glad if you can help solve it.

    On the site, I use Wordfence Security + Yoast SEO Premium plugins. When I create a 301 redirect (Admin Dasboard – SEO – Redirects) and go to the URL where it should work, I get the following warnings instead of the redirect:

    Warning: Use of undefined constant SECURE_AUTH_COOKIE - assumed 'SECURE_AUTH_COOKIE' (this will throw an Error in a future version of PHP) in /home/user/www/mysite/public_html/wp-includes/pluggable.php on line 803
    
    Warning: Use of undefined constant LOGGED_IN_COOKIE - assumed 'LOGGED_IN_COOKIE' (this will throw an Error in a future version of PHP) in /home/user/www/mysite/public_html/wp-includes/user.php on line 348
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/user/www/mysite/public_html/wp-includes/pluggable.php:803) in /home/user/www/mysite/public_html/wp-includes/pluggable.php on line 1296

    However, when I disable Wordfence, the problem disappears. Could you help sort out the problem?

    In addition, I would like to clarify the following:
    1. I use multisite.
    2. If I specify any other redirect code (302, 307, 410 etc.), then the problem is not reproduced.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @kobrenko, thanks for seeking our assistance with this.

    Sometimes issues such as this are caused by a plugin loading a WordPress file outside of the normal order. It might be Wordfence, in which case it’s important we try to figure out the problem, but it might be Yoast or another plugin too.

    If you install the Health Check & Troubleshooting plugin, this allows you to disable all plugins and switch to a default theme, but only for your user to prevent downtime for other site visitors. If you disable all plugins except Wordfence and Yoast at this point, it will confirm if the issue is only between those two.

    If the 301 issue doesn’t reoccur, try turning on the other plugins one-by-one to see when it starts happening again. If it still occurs when trying the above, we’ll have to narrow down the actual cause.

    In this case, it’d great if you could also send us a diagnostic report to wftest @ wordfence . com. You can find the link to do so at the top of the Wordfence Tools > Diagnostics page. Then click on “Send Report by Email”. Please add your forum username where indicated and respond here after you have sent it.

    Note: For the fastest response time, please make sure and add any information or questions directly to this topic and not the email address above unless asked.

    Thanks,

    Peter.

    Plugin Support wfpeter

    (@wfpeter)

    Hi @kobrenko,

    As we’ve not heard back from you for a while, hopefully checking your plugins/themes did the trick. If you have any further Wordfence queries in the future, start a new topic and we’ll be glad to help out any time.

    Thanks again,

    Peter.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Conflict with Yoast SEO Premium (warnings when performing a 301 redirect)’ is closed to new replies.