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.

This thread is resolved. Here is a description of the problem and solution.

Problem: When using domain per language and you try to change language, it tries to load the css files from https://URLURL/wp-content/uploads/maxmegamenu/style_da.css?ver=2343b2 instead of https://URL/wp-content/uploads/maxmegamenu/style_da.css?ver=2343b2

Solution: See Relevant Documentation

Relevant Documentation: https://wpml.org/forums/topic/language-url-format-change/#post-3542069

This topic contains 3 replies, has 2 voices.

Last updated by Laura 6 months, 2 weeks ago.

Assigned support staff: Laura.

Author Posts
April 4, 2019 at 7:38 am #3532877

jensB-24

Under language URL format im trying to change from option 1/3 to option 2 with different domains per language
However, now the site only works correctly on the main site

When going to any other domain it tries to load the css files from hidden link
instead of hidden link

April 4, 2019 at 10:34 am #3534045

jensB-24

i found out that it is a WordPress function called "get_stylesheet_uri()" that returns the wrong URL, however instead of doing a workaround i would like to know why this is the case and what i can do about it

April 5, 2019 at 8:26 am #3542069

jensB-24

I finally solved it
It seems i had 4 lines in my wp-config.php that fucked it up when on domains

define('WP_HOME','<em><u>hidden link</u></em>'. filter_input(INPUT_SERVER, 'HTTP_HOST', FILTER_SANITIZE_STRING));
define('WP_SITEURL','<em><u>hidden link</u></em>'. filter_input(INPUT_SERVER, 'HTTP_HOST', FILTER_SANITIZE_STRING));
define('WP_CONTENT_URL', '/wp-content');
define('DOMAIN_CURRENT_SITE', filter_input(INPUT_SERVER, 'HTTP_HOST', FILTER_SANITIZE_STRING));

After removing those lines from the config i no longer have any issues

April 5, 2019 at 1:56 pm #3544737

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Hi,

happy to hear you solved it, I didn't manage to reproduce and seeing your configuration I can understand why.