-
Notifications
You must be signed in to change notification settings - Fork 799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confirm Safe Mode throws 404 Not found #7589
Comments
Deactivating qTranslate-X fixed the issue. Plugin rewrote the URL. How could we prevent it? API URL should not be translated |
What I don't understand now is what/when is changing the REST API URL At https://github.com/Automattic/jetpack/blob/5.2.1/_inc/idc-notice.js#L99 the URL is good. |
The AJAX URL gets redirected It's at https://github.com/qTranslate-Team/qtranslate-x/blob/3.4.6.9/qtranslate_core.php#L91 via the Upstream already notified qTranslate-Team/qtranslate-x#489 |
Hi @mikaelz thanks for opening this issue. You can solve this on your installation now with this filter: <?php
function jetpack_no_qtranslate_rest_url_redirect( $url_lang, $url_orig, $url_info ) {
if ( false !== strpos( $url_info['wp-path'], 'wp-json/jetpack' ) ) {
return false;
}
return $url_lang;
}
add_filter( 'qtranslate_language_detect_redirect', 'jetpack_no_qtranslate_rest_url_redirect', 10, 3 ); It will check if the url is a REST one, and if so, returning false will prevent the redirection. We'll introduce #7612 in 5.3 which will solve this. |
Thanks @eliorivero. Checked the solution in the mentioned PR and I like it. Didn't know why the 3rd-party dir exists. Learned something new today :) |
Clean WordPress 4.8.1 install with Akismet 3.3.4, Jetpack 5.2.1, qTranslate-X 3.4.6.8
Disabled Little Snitch (firewall) still persists.
The text was updated successfully, but these errors were encountered: