• Resolved nientepopcorn

    (@nientepopcorn)


    I have issue about “Connecting back to this site”

    wp_remote_post() test back to this server failed! Response was: 200 OK<br /> This additional info may help you diagnose the issue. The response headers we received were:<br /> server => nginx<br /> date => Sat, 17 Feb 2018 11:43:48 GMT<br /> content-type => text/html; charset=UTF-8<br /> vary => Accept-Encoding<br /> expires => Thu, 19 Nov 1981 08:52:00 GMT<br /> cache-control => no-store, no-cache, must-revalidate<br /> pragma => no-cache<br /> set-cookie => wfvt_1852757980=5a88089fc9564; expires=Sat, 17-Feb-2018 11:19:03 GMT; Max-Age=1800; path=/; secure; HttpOnly<br /> x-powered-by => Array<br /> link => Array<br /> rt-fastcgi-cache => HIT<br /> content-encoding => gzip<br>

    does it an important thing?

    I send you report by mail.

    Thank you

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @nientepopcorn,

    Does the issue persist if you temporarily switch to a default theme?

    Are you using the “qTranslate X” plugin?

    Thread Starter nientepopcorn

    (@nientepopcorn)

    Hello wfyann,
    the issue does not persist temporarily switch to a default theme (https://cl.ly/2t2o2w0e3v3K).
    I don’t use “qTranslate”.

    do you have any suggestions? something about ajax ?

    Thank you,
    Andrea

    • This reply was modified 6 years, 9 months ago by nientepopcorn.

    Hi @nientepopcorn,

    According to this topic it could indeed be related to Ajax.

    Are you also using a child theme?

    Thread Starter nientepopcorn

    (@nientepopcorn)

    I don’t use a child theme. I use a custom theme.
    I wrote a few lines of code to prevent non-administrator users from browsing in wp-admin.

    BEFORE

    if ( is_admin() ) {
           if ( !current_user_can( 'manage_options' ) && $_SERVER['REQUEST_URI'] != '/wp-admin/admin-ajax.php'){
                header("location:https://www.nientepopcorn.it/"); 
           }
        }

    AFTER

    if ( is_admin() ) {
           if ( !current_user_can( 'manage_options' ) && ($_SERVER['REQUEST_URI'] == '/wp-admin/' || $_SERVER['REQUEST_URI'] == '/wp-admin/index.php')) {
                header("location:https://www.nientepopcorn.it/"); 
           }
        }

    Does it seem to make sense to you?

    Now “Connecting back to this site” is OK

    Hi @nientepopcorn,

    After discussing this topic with my colleagues I can confirm that such code will most likely break all unprivileged AJAX calls.

    The permissions controls within WordPress already take care of preventing non-administrator users from browsing wp-admin; so you shouldn’t need to add that code.

    Can you confirm that the issue disappears if you remove that specific part of the code?

    Thread Starter nientepopcorn

    (@nientepopcorn)

    I want to redirect subscribers who for some reason are browsing backend dashboard or their backend profile page.

    I update code as follow, I do not think it can interfere with wordfence plugin:

    if ( is_admin() ) {
           if ( !current_user_can( 'manage_options' ) && ($_SERVER['REQUEST_URI'] == '/wp-admin/' || $_SERVER['REQUEST_URI'] == '/wp-admin/profile.php' || $_SERVER['REQUEST_URI'] == '/wp-admin/users.php?page=bp-profile-edit' || $_SERVER['REQUEST_URI'] == '/wp-admin/index.php')) {
                header("location:https://www.nientepopcorn.it/"); 
           }
        }

    I confirm that Now “Connecting back to this site” is OK

    Hi @nientepopcorn,

    Thanks for sharing the solution you applied! This could benefit other users.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Connecting back to this site’ is closed to new replies.