-
Notifications
You must be signed in to change notification settings - Fork 107
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
NextGen Gallery uploader not working #1266
Comments
See also #1096 though it looks like a different issue. |
It looks like activating "Hide URL language information for default language" in qtranslate-XT options / General / URL Modification Mode solves the problem/ |
Thanks for the info, that's useful. I'll look into it. |
This is the error message sent by Wordpress that made me think of selecting the option with hiding the url (notice the double slash character between 'domain.com' and 'wp-admin'): `Howdy! WordPress caught an error with one of your plugins, qTranslate-XT. The page where the error was caught (http://www.domain.com/wp-login.php?redirect_to=https://domain.com//wp-admin/) and check for any visible issues. [...] WordPress version 6.1.1 Error DetailsAn error of type E_ERROR was caused in line 102 of the file .../wp-content/plugins/qtranslate-xt-3.13.0 - ian 05 2023/qtranslate_core.php. Error message: Uncaught AssertionError: language needs to be shown in url - cancelled by can_redirect, url_info={ |
The problem is clear, the requested URI is "wrong" in the sense it doesn't contain the language, but at the same time the request is not detected as AJAX by qTranslate. I have a solution on the table, to check Even the assert on the redirect is wrong with Ajax requests. So there's quite a bit to fix and test here. But this could solve many related issues. See also RFC6648: the |
Happy to help with testing, if needed, on my dev WordPress site (NextGen, Qtranslate XT, custom theme). That's pretty much where my area of expertise ends. |
See #1326. |
You can test from this tree: The main fix is trivial, it's only about removing an |
Or even better with this, just with another minor fix but that should work the same: |
With the version above of qtranslate XT (b2b7c16) the NextGen Gallery specific uploader works as expected, no error upon uploading. No other problem noticed for the moment. |
Great. I want to arrange a few things before releasing a fix as 3.14.2 that I want independent from the rolling updates in master that cover many other topics. I'll you know when it's up. |
Fix released in 3.14.2 with other improvements for Ajax requests. |
Intro: I am not a programmer, I am a (web) designer. I use the browser DevTools mainly to work on css styling. My knowledge in using debugging tools is limited.
The problem (probably similar with #1096?)
Environment:
Wordpress 6.1.1
PHP 8.0.26
Qtranslate XT ver 3.12.1 (with Yoast SEO 19.11, ACF 6.0.5, Slugs translation built-in modules activated)
NextGen Gallery ver 3.3.0
Short description:
Failing to upload images using the Nextgen upload function. The WordPress uploader works correctly.
Long description:
The problem appears in the admin area of WordPress, only when using the Nextgen uploader. After dropping the files for upload (or selecting the files using the "Browser" button) and hitting the "Upload" button, the upload progress is shown as going from 0 to 100%, but in the end the upload fails.
The error message I get in the Chrome/Developer Tools/Network/Fetch/XHR is this one:
AssertionError thrown
language needs to be shown in url - cancelled by can_redirect, url_info={ "cookie_lang_front": "en", "cookie_front_or_admin_found": true, "scheme": "https", "host": "mywebsite", "path": "\/index.php", "query": "photocrati_ajax=1", "path-base": "", "doing_front_end": true, "wp-path": "\/index.php", "lang_cookie_front": "en", "doredirect": "language needs to be shown in url - cancelled by can_redirect", "language": "en", "set_cookie": true }
This might very well be a problem with NextGen, and not with Qtranslate XT. But if I deactivate the Qtranslate XT plugin, the problem disappears. I tried deactivating the Qtranslate XT built-in modules, but no luck. I also tried deactivating other plugins, again no luck.
It's "language needs to be shown in url" that makes me believe it is related to Qtranslate XT.
The text was updated successfully, but these errors were encountered: