[Resolved] Allowing Languages to use personalized flag (en_US & es_MX)
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was unable to save changes when trying to use personalized flags for different languages on their WPML settings page. Despite attempting to save, the page did not respond, and no confirmation of 'Changes Saved' appeared. The issue persisted even after deactivating cache and security plugins. Solution: We identified that the problem was not related to the flags themselves but was due to a JavaScript error on the language edit page. Here are the steps we recommend: 1) Navigate to WPML > Settings > Translation Mode and change it to 'Translate What You Choose'. 2) Return to the language settings and attempt to add the image and save again. If these steps do not resolve the issue, it might be because the solution is outdated or not applicable to your specific 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 the problem persists, 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.
Background of the issue:
I am trying to allow languages to use personalized flags (en_US & es_MX) and save the changes on the page: hidden link.
Symptoms:
When I try to save, nothing happens. I expected to see 'Changes Saved', but instead, I got nothing.
Questions:
Why are the changes not being saved?
Is there a specific setting I need to adjust to allow personalized flags?
Is the page blocked from making changes?
Why is Idioms editing having trouble saving and making the change?
I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)
**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **
I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.
NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.
I was able to reproduce the error and it looks like it's not related to the flags but rather an issue with the language edit page.
If you go to WPML->Languages->Edit languages-> click in the default locale box (it will enable the save option), and click save, nothing will happen.
The console is logging the following error:
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'value')
at app.js?ver=4.6.13:57:16159
at NodeList.forEach (<anonymous>)
at app.js?ver=4.6.13:57:15980
at app.js?ver=4.6.13:57:16344
at app.js?ver=4.6.13:57:2743
at app.js?ver=4.6.13:57:2437
at app.js?ver=4.6.13:57:2717
at o (app.js?ver=4.6.13:57:2761)
at app.js?ver=4.6.13:57:2818
at d (app.js?ver=4.6.13:43:77106)
Try this workaround and let me know your results please:
1) WPML > Settings> Translation Mode, change to "Translate What You Choose"
2) Head back to add the image and save