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?
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
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');
My problem comes from the URL :
http://mydomain.com/wp-login.php/?action=logout results to 404
http://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?
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?
There is no .htaccess, I am on NGINX server… and I use the WordPress NGINX config.
strange…