This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Tagged: Exception
Author | Posts |
---|---|
February 25, 2025 at 4:13 pm #16746915 | |
desireeM |
Background of the issue: Symptoms: Questions: |
February 25, 2025 at 6:57 pm #16747520 | |
desireeM |
I just realized that another issue I encountered recently https://wpml.org/forums/topic/wrong-url-on-translated-media-files-when-using-a-different-domain-per-language/#post-16747516 has the same root cause as this. e.g. if I open foo.fr/wp-admin/post.php?post=1234&action=edit&lang=en then the uploads URL is foo.com instead of foo.fr |
February 26, 2025 at 7:28 pm #16753178 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-04:00) |
I have set up a test install with different domains per language and everything looks to be working correctly. Let me outline my tests here. 1. Log in to the English site at hidden link On the frontend of the site, switch to French. It keeps me logged in because I have the option to automatically log in and out set. I click the admin user bar to view the dashboard. Now, the backend looks like this: and for French is: So what I find is that changing the langauge using the admin language on the backend doesn't necessarily change the URL, but it is working as expected. Chagning the language on the frontend DOES change the URL and if you then access the backend, you will see the wp-admin with whichever language you visited last on the frontend. If you would like to test my test site, let me know and I can share credentials and you can update your hosts file. If you are experiencing different results on your live site, please write out step by step what steps to take so I can confirm the steps. If the steps on your site are the same as mine with different results, then it could be a conflict with another plugin or theme and we will need to test minimal settings, which is best done in a staging site if you have one. |
March 4, 2025 at 7:44 pm #16775774 | |
desireeM |
Please add this to the themes functions.php add_action( 'admin_init', function () { var_dump( wp_get_upload_dir()['baseurl'] ); exit; }, 10, 0 ); Then open: hidden link What does it print? |
March 4, 2025 at 8:20 pm #16775831 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-04:00) |
It prints: Feel free to login with username hello@wpml.org and password JqsmcyFG55 and test as much as you like. |