Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 -
- 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 -

Supporter timezone: Asia/Dhaka (GMT+06:00)

Tagged: 

This topic contains 43 replies, has 2 voices.

Last updated by Prosenjit Barman 7 months, 2 weeks ago.

Assisted by: Prosenjit Barman.

Author Posts
July 24, 2024 at 3:40 am #15995544

peterB-149

Background of the issue:
I am trying to ensure that all CSS files load correctly on all versions of my site. The original English version (hidden link) and one translated version (hidden link) load all CSS files correctly. However, two other translated versions (hidden link and hidden link) are not loading all CSS files.

Symptoms:
CSS files are not loading on the translated versions of the site (hidden link and hidden link), causing display issues such as the menu not displaying properly and the header being too tall.

Questions:
Why are the CSS files not loading on the translated versions of my site?
How can I ensure that all CSS files load correctly on all translated versions of my site?

July 25, 2024 at 3:57 am #16001098

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're experiencing. The CSS seems to be strictly optimized using WP Rocket, which might be causing the CSS to not work properly in other languages. Please try the following steps and see if they helps in solving the issue:

1. Go to the WP Rocket settings and temporarily disable CSS optimization.
2. Then, go to WPML > Languages.
3. Under the "different domains per language" option, enable the "Automatically log in and out" option and save the changes.
4. Next, navigate to Settings > Permalinks and resave the permalink structure.
5. Sign out from the main site and sign back in. Alternatively, you can sign in from the domain where you're experiencing CSS issues. This process will ensure that cookies and other necessary information are shared across different domains.
6. Enable the CSS optimization, clear the caches from your site and browser, and then check again.

Please let me know how it goes. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

July 26, 2024 at 5:24 am #16006651

peterB-149

Hello,

"Automatically log in and out" was already selected but I disabled it and then enabled it again.

I carried out all of the steps you have outlined however it did not work.

Regards,
Peter

July 26, 2024 at 11:35 am #16008458

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello Peter,
Thank you for the update.

I took a closer look and observed that the header initially loads correctly on the translated version, but after a moment, the layout changes and no longer resembles the default header.

Upon further investigation using the browser console, I found that disabling a specific script from Betheme (`wp-content/cache/min/1/wp-content/themes/betheme/js/scripts.js`) prevents this issue from occurring. Please check this hidden link">screenshot.

Please note that the script and other static files are currently being loaded from the cache. Therefore, it is highly likely that the cache is causing the layout to display incorrectly in the LU and MD languages.

As a first step, please temporarily disable caching and any performance configurations made in the BeTheme settings. Wait for a while, then check again using a new browser or in incognito mode.

If the issue persists, it will be necessary to identify which function in the script is causing conflicts and issues in certain languages. Please specify if you are able to trace which CSS files aren't loading. I will take a closer look and do my best to assist you with this matter.

Best regards,
Prosenjit

July 29, 2024 at 8:36 am #16014495

peterB-149

Hi,

"Please note that the script and other static files are currently being loaded from the cache. Therefore, it is highly likely that the cache is causing the layout to display incorrectly in the LU and MD languages."

Strange that this doesn't happen for the EE domain though?

"As a first step, please temporarily disable caching and any performance configurations made in the BeTheme settings. Wait for a while, then check again using a new browser or in incognito mode."

I don't use any performance settings in BeTheme settings, this is all handled by WP Rocket.

Regards,
Peter

July 30, 2024 at 4:44 am #16018448

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi Peter,
Thank you for the update.

It’s indeed strange that the same script behaves differently on other domains but specifically causes issues in LU and MD domains. To understand the root cause of the issue, a closer inspection will be required.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.

You will find the needed fields 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.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT
-Please backup site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Looking forward to your response.

Best Regards,
Prosenjit

July 31, 2024 at 2:02 pm #16025708

peterB-149

Hi,

I've just taken a look at the site and the privacy bar which is generated through Betheme no longer loads.

I'm wondering if other Betheme functionality that I haven't noticed won't work anymore?

Also could you please make those images private as it discloses my websites.

Regards,
Peter

August 1, 2024 at 4:49 am #16027421

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi Peter,

The only adjustment I made on your site was excluding a script from Betheme from being executed with a delay in the WPRocket settings. If you believe this setting caused issues with Betheme elements, please remove the script from the exclude list (WPRocket > Settings > File Optimization) and then check again.

Let me know the update. I will be happy to help if you need further assistance in this matter.

[As per your request, I have made the reply containing your site image private.]

Best regards,
Prosenjit

August 1, 2024 at 7:53 am #16028058

peterB-149

Hi,

I already tried this and the privacy bar loaded fine, then when I added the file back to WP Rocket again it stopped working again.

Regards,
Peter

August 5, 2024 at 4:06 am #16037356

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello Peter,
I hope you're doing well. Sorry for the delay in responding due to the weekend.

The script that I excluded should only be skipped from loading in delay and shouldn't affect the site's features or functionality. However, since removing the script resolved the issue with the Privacy banner, I removed it and accessed the other language versions. The Privacy banner appears on the IN and EE versions, but it still doesn't show on the LU and MD versions.

I added the script to the exclusion list again, but the result remains the same. The Privacy bar configuration might not have been copied to the other languages, which could be causing the issue. Please try the following steps to see if they help resolve the problem:

- Go to Betheme > Theme Options > GDPR.
- Switch to 'All Languages' using the Language switcher on the top bar of the Admin panel.
- Make any changes to the GDPR contents and save the changes.
- Clear the site and browser caches, then check again.

Please let me know how it goes. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

August 5, 2024 at 7:38 am #16037742

peterB-149

Hi,

I did previously add translations for this GDPR privacy bar using string translation, however these translations seem to have been wiped. That's a separate issue that I sometimes experience.

"However, since removing the script resolved the issue with the Privacy banner, I removed it and accessed the other language versions."

Now that the script has been removed from the exceptions I still get the original problem with the header being too tall.

Regards,
Peter

August 6, 2024 at 2:02 am #16042334

peterB-149

Hi,

Is there any update on this please?

August 6, 2024 at 3:50 am #16042386

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi Peter,
Thank you for the update.

Please keep the script on the exclusion list, as excluding it resolves the style issue on the frontend. I have added the script again to the exclusion list and the header is now showing correctly on both the LU and MD version.

During the investigation, I also noticed that the script doesn't seem to affect the privacy bar. Even if the script is removed from the exclusion list, the privacy bar still doesn't appear in the LU and MD versions. Therefore, the issue with the privacy bar on the LU and MD versions seems to be a different issue.

To maintain clarity, we are allowed to discuss only one issue per ticket. Therefore, I kindly request you to create a new ticket for the Privacy Bar issue on the LU and MD versions. One of our support team members will take over the ticket and assist you accordingly.

Please let me know if you need any further clarification or assistance with the Header layout issue on the LU and MD versions. I'll be happy to help.

Best regards,
Prosenjit

August 6, 2024 at 4:33 am #16042406

peterB-149

Hi,

The script is affecting the privacy bar, you have now added it to the exclude list and the privacy bar is not displaying at all. When the script is not excluded it is there?

hidden link - there is no privacy bar now that the script is excluded.

August 6, 2024 at 1:28 pm #16044161

peterB-149

Hi, do you think we will be able to get this resolved today please as this has been going on for about 2 weeks now?

The topic ‘[Closed] CSS files not loading on translated version of website’ is closed to new replies.