This thread is resolved. Here is a description of the problem and solution.
Problem:
Media files not displaying on secondary language in Media library, When domains per language are used
Solution:
Add the below code to theme (child theme) funcitons.php
add_action( 'init', function() { remove_all_filters( 'upload_dir' ); } );
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: Language Redirection
Related documentation:
This topic contains 17 replies, has 3 voices.
Last updated by Tsuyoshi 1 year, 6 months ago.
Assigned support staff: Raja Mohammed.
Author | Posts |
---|---|
June 11, 2019 at 3:10 am #3991563 | |
Tsuyoshi |
I am trying to set 2 different language's sub domain sites on current live site. Link to a page where the issue can be seen: hidden link or hidden link I expected to see: Chinese and Korean pages Instead, I got: all original Japanese site. Also I'm having not valid error when I set up Language URL format as "A different domain per language" |
June 11, 2019 at 3:23 am #3991639 | |
Riffaz Supporter Languages: English (English ) Timezone: Asia/Colombo (GMT+05:30) |
Hi, The reason that WPML indicates that your configuration is incorrect is that the domain hidden link is acting as a forward to other domain or similar. When using Language per Domain all domain/sub-domains need to point to the same place so that WPML can correctly identify and server the correct pages depending on what language is configured. In your case, it is just a matter of pointing hidden link (configuring the CNAME) to the same IP/server/root as hidden link Please follow the steps carefully: https://wpml.org/2016/04/use-wpml-different-domains-per-language/ Let me know how it goes and if everything works as expected. Regards, |
June 11, 2019 at 7:23 pm #3998233 | |
Tsuyoshi |
Thank youRiffaz, |
June 12, 2019 at 7:16 am #4001001 | |
Riffaz Supporter Languages: English (English ) Timezone: Asia/Colombo (GMT+05:30) |
Hi, So this is fine now, right? Please close this ticket and confirm. If you have any other question please create a new ticket. Regards, |
June 12, 2019 at 11:48 pm #4007949 | |
Tsuyoshi |
No! hidden link and hidden link show only original Japanese language not Chinese or Korean. |
June 14, 2019 at 9:42 am #4019975 | |
Raja Mohammed Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
HI there, Riffaz is off today I will take care of this ticket, If I understand this correctly the primary domain is kualoa.jp in the Japanese language the subdomains ch.kualoa.jp/ and kr.kualoa.jp/ should display Chinese and Korean respectively, is that right ? or correct me if am wrong. I have enabled private fields for you to securely share temporary access to your site so that I can check for a few parameters for a better understanding of the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it. Kind regards |
June 17, 2019 at 4:49 am #4032061 | |
Raja Mohammed Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi there, I am unable to login with the details provided, Please edit your previous reply and update the details with the working login credentials. please let me know once done. Kind regards |
June 18, 2019 at 8:16 pm #4046371 | |
Tsuyoshi |
Sorry. I reset password and confirmed it works. Please try again. |
June 19, 2019 at 11:26 am #4051115 | |
Raja Mohammed Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Thanks, I can confirm the login details are working fine. I have checked your site by adding the language switcher to the footer from WPML > Lanagues > Footer language switcher. The translation seems to work fine without any issue. It is important to navigate the site through Language switcher to confirm the working of Domains per language. Only Language switcher can pass the session data from one language to another. Please also check the DNS setting for the domains, make sure the subdomains are mapped to the main domain, Please share the DNS details as well. let me check if there is an issue with it Kind regards |
June 25, 2019 at 8:38 pm #4087143 | |
Tsuyoshi |
Thank you. I could confirm the site can be switched by your footer switcher. But your change made confuse for live site. Therefore I built staging server and updated site information. But URL of one css files is corrupted. Staging english site is hidden link. One css's address is Do you have any idea to fix this? |
June 26, 2019 at 1:54 am #4087673 | |
Tsuyoshi |
Also slider's photo address was hidden link. |
June 26, 2019 at 12:49 pm #4092547 | |
Raja Mohammed Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Glad your domain issue is resolved. I am unable to access your staging site it seems like the site is htaccess protected. I have enabled private fields please provide access to the site Kind regards |
June 26, 2019 at 6:53 pm #4094673 | |
Tsuyoshi |
I entered it on FTP's section. Please try to use those for basic auth to access the site. |
June 27, 2019 at 2:35 am #4095805 | |
Raja Mohammed Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
I am still not able to access the site dashboard. The CSS is generated by the fusion builder try to resave the CSS check if that helps. The en domain name is repeated twice check the site URL and home URL has a proper format in Settings > General. Kind regards |
July 3, 2019 at 8:39 pm #4138879 | |
Tsuyoshi |
Ok. I modified theme function to call dynamic css directory. So css works now. The images don't show even in media library at seceond languages. Image tag became like this. |