[Resolved] auto translate everything / flag icon not appearing in menu
This thread is resolved. Here is a description of the problem and solution.
Problem: You are experiencing issues with the flag icon not appearing in the main menu after switching to 'auto translate everything' mode in WPML, despite not clicking the 'Sync Menu' button or manually creating translations. Additionally, you encountered a PHP Fatal error indicating an exhausted memory limit. Solution: First, increase the WordPress memory limit by adding the following lines to your wp-config.php file:
Add these lines above the '/* That's all, stop editing! Happy blogging. */' line. This adjustment should help resolve the memory issue and allow for smoother operation of WPML functionalities.
Next, ensure your site key is correctly registered to use automatic updates. If updates are not working, generate a new site key by deleting the current site URL from your WPML account at https://wpml.org/account/sites and re-adding it. This action will provide a new site key. Then, unregister and re-register WPML on your site with the new key by navigating to Plugins -> Add New -> Commercial tab and following the prompts to update or enter the new site key.
If these steps do not resolve your issue or if the solution seems outdated or irrelevant to your specific case, we 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. Should you need further assistance, please open a new support ticket at WPML support forum.
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.
I found that when I tried to edit the homepage, the site was throwing a fatal error. So I enabled debug log and saw the fatal error was related to The Events Calendar. If you disable that plugin, you can see that I was able to edit the homepage as well as add the language switcher to the Top Primary Menu through WPML -> Languages. I also found that the footer is created using a template, so I inserted a language switcher using Elementor and you can see that in the footer as well.
I suggest reaching out to The Events Calendar plugin support and perhaps they can help resolve the critical error. As soon as I reactivated The Events Calendar and try to open the homepage, it throws a fatal error again.
ok so if I deactivate the events calendar plugin, there is no fatal error...? I can live without the events calendar.
there's still an issue on the home page, that the flag icon when in English mode, does not display the Spanish flag when moused over.
However, if I click on any other page in English mode, then the Spanish flag does display when moused over.
But as you can see in my screen grab, in Spanish mode, the menu link for HOME and the submenu link for NEWS, do not appear.
Do you have any ideas what is causing the problem? When I first saw this and investigated, it took me to a page saying the home page and news page were pending approval. When I try to manually approve the translation I get an error message. Can you try to replicate this so you see what I am seeing ? Thanks
I found that when I edit the SPanish. homepage, it was not published. I now have published it, but I need to check the database to see if the languages have a matching TRID for the homepage. Is it okay if I install an Adminer plugin to check the database for the TRID?
also, when in Spanish mode, the submenu item for 'NEWS' is still not showing up when scrolling over the 'About CLJR' dropdown...
you'll see in English mode the dropdown has 3 menu links: Mission, Leadership, News...
I found a few additional problems with further testing. First, I noticed that the WP Memory was below the required limit, which could be why the error was happening with The Events Calendar. Low memory can cause all sorts of issues. I fixed that by increasing the WP Memory in your wp-config.php file.
Then, I reran the menu sync and inserted the footer language switcher. Now, I can switch back and forth between English and Spanish without any issue using the footer languag switcher. The News item also shows in both menus.
How are you adding the language switcher to the header? Are you using a template? Perhaps try deleting the menu language switcher and try adding it back and then clear cache and see if anything changes.
that's odd about the memory issue... I had Kinsta tech support up it to 256M and verified it so not sure how it became lower.
The header and footer are templates. Not everything in the footer is translated. The request for Donations is part of the footer template.
I just checked the site and in Spanish mode, the News tab does appear, but when clicked it goes to a 404 page.
Also, when I switch back to English mode, and go to the News page, the translation icon does note have the drop down option to switch to Spanish mode.
On the home page, most content has not been translated. I thought the auto translate everything option would have taken care of that. As a first time user of WPML, you can see why I'd never be able to figure out all the conflicts.
The issue with the footer content is that it was created using a layout and Layouts post type was set as not translatable. I have changed that in the WPML settings and tested with the Footer and now you can see the content as translated. You will need to translate the other layouts that are not translated.
As for the Spanish News, I click it in the main menu and it takes me to hidden link and I don't get a 404 page. Please test in an incognito browser or clear the cache and check again. I am also seeing the language switcher and can click back and forth without any issues to switch languages.
The homepage had been changed to use the native WordPress editor which could by why the translations weren't showing. I switched it back to WPML and resaved the translation and now I see the homepage content translated.
Please let me know if you need any further assistance and I will be happy to help.
Thank you for fixing the home page and footer translations. I never had any reason to use the WP editor so I have no idea how it could have been switched out of Elementor. I never deactivated Elementor.
When I click the URL link you sent for the Spanish News page, I still get a 404. I did this in Chrome incognito, which I had never used to visit the site. There was no previous site data in Chrome's cache. See attached.
When in English mode, and on the News page, the flag switcher does not have the dropdown. See attached.
Another odd thing in Spanish mode is photo galleries do not show up on the 2 most recent News posts:
hidden link
hidden link
You'll see what's missing by switching from English to Spanish mode while on the posts.
Other pages and posts have similar galleries that do show up in Spanish mode. Still images and photo slideshows also do appear fine in Spanish mode.
Also on this post, some galleries appear, while others do not. There are 3 galleries in the middle that appear in English mode, but not Spanish mode. ES mode only shows the top and bottom galleries.
The issue with the news page was that it was in draft still. It hadn't been published, which explains why I was seeing it but you were not in an incognito browser. I published it and now you can see it when not logged in and the language switcher works as expected.
The issue with the missing galleries is that your media had not been synced to your secondary language. I went to WPML -> Settings and in the Media Translation section, I ran the sync. Now I can see the galleries. If there are any pages that you still are not seeing the galleries, try updating the original post and then the translation.
ok, I will review everything you fixed and go page by page to look for any other issues. I'll let you know if I find anything that I can't fix myself. Thanks...
Hello. I was updating plugins for the staging site and when I clicked the update for WPML CMS there was a critical error. Now it's just a white screen.
Also, you had mentioned that the Events Calendar plugin was causing a conflict so you deactivated it a week ago. However, when I was in admin, it was still active and needed an update.
There were 4 plugin updates and 1 theme update. This is the order I made the updates:
1. Give plugin
2. Events Calendar plugin
3. Yoast plugin
4. theme update
5. WPML CMS
Not sure what to do now since the update to WPML CMS crashed the site.
???