Home›Support›English Support›[Resolved] My js is not getting adde for fr,de,sv,no and da languages but fo en,nl and es it gets added
[Resolved] My js is not getting adde for fr,de,sv,no and da languages but fo en,nl and es it gets added
This thread is resolved. Here is a description of the problem and solution.
Problem: The client reported that the JavaScript file 'wpgmp-project-filters.js' was not loading on their site's translated pages for German (de), French (fr), Norwegian (no), Danish (da), and Swedish (sv) languages, although it was loading correctly for English (en), Dutch (nl), and Spanish (es). Solution: Initially, we suggested clearing all caches (plugin, server, Cloudflare, etc.) to see if that resolved the issue. Upon further investigation, we discovered that the problem was due to custom code in the file
wp-content/themes/kebonyglobal/functions.php
. Specifically, the function
kebony_relocate_inline_scripts()
contained a line of code that needed commenting out:
// strpos($src, 'project') !== false ||
After making this change, the JavaScript file should load correctly on all language versions of the site.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket.
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.
Languages: English (English )Vietnamese (Vietnamese )
Timezone: Asia/Ho_Chi_Minh (GMT+07:00)
Hi Yashvit,
I'm Long from the WPML Development team, I'm happy to help you with this issue.
Please notice that the String Translation plugin will scan strings in the JavaScript files and add them to the JSON file under the folder /wp-content/languages/wpml/
Then you can go to WPML > String Translation > Search for the strings and translate them.
If it doesn't work, I would like to request temporary access (wp-admin and FTP) to your site so I can take a better look at the issue. It would be better to have a testing site where the issue is replicated. Your next reply is set to private to share the info.
see this en , nl, and es link it wors properly with my wpgmp-project.js file hidden link hidden link hidden link
but same is not working on de,fr,no,da,sv as when i check the file in page source its not present but for above i can see it present hidden link hidden link hidden link hidden link hidden link
check view page source and search this file "wpgmp-project-filters.js"
Languages: English (English )Vietnamese (Vietnamese )
Timezone: Asia/Ho_Chi_Minh (GMT+07:00)
Hi,
So I understand that the JS file "wpgmp-project-filters.js" is not loaded on some translation pages in de, fr, no, da, sv languages.
It might be a caching issue. Can you please try to clear all caches (plugin, server, Cloudflare ...) and recheck the issue?
If it still doesn't work, please share your site credentials as I mentioned above so I can check it further. Your next reply is set to private to share the info.
Languages: English (English )Vietnamese (Vietnamese )
Timezone: Asia/Ho_Chi_Minh (GMT+07:00)
Hi,
Sorry for the late reply due to the weekend.
I get this error message when logging-in to the admin area "LOGIN BLOCKED: 2FA is required to be active on your account. Please contact the site administrator."
Can you please disable 2FA for the shared account?
Languages: English (English )Vietnamese (Vietnamese )
Timezone: Asia/Ho_Chi_Minh (GMT+07:00)
Hi,
After investigating the issue, I found the issue arises from your custom code in the function kebony_relocate_inline_scripts(), file wp-content/themes/kebonyglobal/functions.php
comment out the code on line 2361
// strpos($src, 'project') !== false ||
will resolve the issue. Please check the attached screenshot.