Hi,
Site is working fine before i upgraded the website to the latest version of Joomla.
Now On language change it is not showing the Tabs on Product page . Only working with English language which is default language.
Description
Compliance Certificates
Related Products
Page Url French :
https://fr.staging.dintek.com.tw/index. ... cable-gray
Img attached : fr.PNG
Englsih :https://staging.dintek.com.tw/index.php ... cable-gray
Img attached : en.PNG
I am also getting errors in console on language change. Img attached=> console.PNG
Access to script at 'https://staging.dintek.com.tw/media/ven ... n.js?5.3.2' from origin 'https://fr.staging.dintek.com.tw' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Please guide me to solve this
Thanks
Multilingual - No 'Access-Control-Allow-Origin' for JS files on language change
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
-
- Joomla! Fledgling
- Posts: 2
- Joined: Thu Nov 02, 2023 4:59 am
Multilingual - No 'Access-Control-Allow-Origin' for JS files on language change
You do not have the required permissions to view the files attached to this post.
Last edited by toivo on Fri Nov 03, 2023 8:25 am, edited 1 time in total.
Reason: mod note: typo in subject
Reason: mod note: typo in subject
- pe7er
- Joomla! Master
- Posts: 25057
- Joined: Thu Aug 18, 2005 8:55 pm
- Location: Nijmegen, Netherlands
- Contact:
Re: Mutilingual - No 'Access-Control-Allow-Origin' for JS files on language change
Welcome to Joomla forum!
Are you using Google Chrome?
Chrome version 118 has an issue with the "Cross-Origin-Opener-Policy" (CORS) setting in your website.
Joomla uses the "System - HTTP Headers" plugin for extra safety.
For testing you can switch it off temporary: System > Plugins > search the "System - HTTP Headers".
The first tab "Cross-Origin-Opener-Policy" is default "same-origin".
When you set it to "Disabled" the error issue will go away.
However, that is not recommended.
When you update to Chrome 119 the error will be gone.
See this related topic:
viewtopic.php?f=817&t=1004745
Are you using Google Chrome?
Chrome version 118 has an issue with the "Cross-Origin-Opener-Policy" (CORS) setting in your website.
Joomla uses the "System - HTTP Headers" plugin for extra safety.
For testing you can switch it off temporary: System > Plugins > search the "System - HTTP Headers".
The first tab "Cross-Origin-Opener-Policy" is default "same-origin".
When you set it to "Disabled" the error issue will go away.
However, that is not recommended.
When you update to Chrome 119 the error will be gone.
See this related topic:
viewtopic.php?f=817&t=1004745
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
-
- Joomla! Fledgling
- Posts: 2
- Joined: Thu Nov 02, 2023 4:59 am
Re: Multilingual - No 'Access-Control-Allow-Origin' for JS files on language change
Hi
Plugin "System - HTTP Headers" is already disabled on the wesbite.
And I am getting 'Access-Control-Allow-Origin' in every browser and My client also getting same error in console.
Thanks
Plugin "System - HTTP Headers" is already disabled on the wesbite.
And I am getting 'Access-Control-Allow-Origin' in every browser and My client also getting same error in console.
Thanks
- pe7er
- Joomla! Master
- Posts: 25057
- Joined: Thu Aug 18, 2005 8:55 pm
- Location: Nijmegen, Netherlands
- Contact:
Re: Multilingual - No 'Access-Control-Allow-Origin' for JS files on language change
Does your server send those "Cross-Origin-Opener-Policy" headers itself?
Joomla's "System - HTTP Headers" plugin can configure HTTP Security Headers, you can also configure it as server level.
You can check your HTTP Security Headers at https://securityheaders.com/
Joomla's "System - HTTP Headers" plugin can configure HTTP Security Headers, you can also configure it as server level.
You can check your HTTP Security Headers at https://securityheaders.com/
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
- ceford
- Joomla! Hero
- Posts: 2794
- Joined: Mon Feb 24, 2014 10:38 pm
- Location: Edinburgh, Scotland
- Contact:
Re: Multilingual - No 'Access-Control-Allow-Origin' for JS files on language change
Standard Joomla 4 Multilingual sites have the currently selected language following the domain and not preceding the domain. And assets mostly do not include the domain, so this:
Rather than
That could be the problem. Not sure and don't know how you would fix it. The problem affects your js modules and fonts (woff).
Code: Select all
<script src="/media/system/js/core.min.js?576eb51da909dcf692c98643faa6fc89629ead18" data-asset-name="core"></script>
Code: Select all
<script src="https://staging.dintek.com.tw/media/system/js/core.min.js?9c761ae035a6bd778a710e6c0f5ff7de049b67a3"></script>
- pe7er
- Joomla! Master
- Posts: 25057
- Joined: Thu Aug 18, 2005 8:55 pm
- Location: Nijmegen, Netherlands
- Contact:
Re: Multilingual - No 'Access-Control-Allow-Origin' for JS files on language change
I think that ceford is right. I had not spotted that. Good catch! Thanks ceford!ceford wrote: ↑Fri Nov 03, 2023 6:10 pm Standard Joomla 4 Multilingual sites have the currently selected language following the domain and not preceding the domain. And assets mostly do not include the domain, so this:
Code: Select all
<script src="/media/system/js/core.min.js?576eb51da909dcf692c98643faa6fc89629ead18" data-asset-name="core"></script>
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com