Viewing 8 replies - 1 through 8 (of 8 total)
  • It’s possible this is a conflict caused by your theme or another plugin. To check if it is, can you test with all other plugins deactivated and while running the default WordPress theme?

    Thread Starter holidays_coder

    (@jteks)

    Desactiving the “WPML Multilingual CMS” plugin, the logout page (wp-login.php?action=logout) does not result in 404… As you can understand, I can not keep this plugin disable.

    I am in WordPress 4.7.4 and “WPML Multilingual CMS” v3.7.0 (in PRO version).

    I will debug it this afternoon, if I dont reply to my message I will not find the solution

    Thread Starter holidays_coder

    (@jteks)

    The problem comes from your WPML fix.

    //Added fix for WPML
    public static function logoutUrl( $logout_url ){
        //Add ICL if necessary
        if( defined('ICL_LANGUAGE_CODE') ){
            $logout_url .= ( strstr($logout_url,'?') !== false ) ? '&':'?';
            $logout_url .= 'lang='.ICL_LANGUAGE_CODE;
        }
        return $logout_url;
    }

    Removing the line, the logout works … but without ajax:
    add_filter('logout_url', 'LoginWithAjax::logoutUrl');

    Thread Starter holidays_coder

    (@jteks)

    My problem comes from the URL :
    https://mydomain.com/wp-login.php/?action=logout results to 404
    https://mydomain.com/wp-login.php?action=logout is OK

    Have you an idea how to resolve it ? (server config ? or other ?)

    The structure wp-login.php/?action=logout is wrong (which is why it’s a 404) and shouldn’t be used. Where is it appearing and do you know how it’s being generated?

    Thread Starter holidays_coder

    (@jteks)

    I don’t know from where is the problem. I will study on it and will inform you about the source of the problem if I find it (at this time, I have a redirection 301 from wp-login.php?action=logout to wp-login.php/?action=logout).

    Is the 301 redirect in your .htaccess file?

    Thread Starter holidays_coder

    (@jteks)

    There is no .htaccess, I am on NGINX server… and I use the WordPress NGINX config.

    strange…

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Logout results to 404’ is closed to new replies.