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 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 |
- | - | - | - | - | - | - |
Supporter timezone: America/Lima (GMT-05:00)
This topic contains 11 replies, has 0 voices.
Last updated by Andreas W. 4 days, 1 hour ago.
Assisted by: Andreas W..
Author | Posts |
---|---|
January 2, 2025 at 8:58 pm #16559825 | |
desireeH-2 |
Background of the issue: Symptoms: Questions: |
January 2, 2025 at 11:12 pm #16560088 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Are all your pages translated and published? WPML > WP Menus Sync will create all menu entries for pages that already have been translated and published. Custom menu items will need to be translated with WPML > String Translation or can get adjusted manually in each menu directly. Did you already read this guide? Also, the WP MEMORY LIMIT of 128M might not be enough to run a site with such high amount of active languages. Please revise WPML > Support > PHP which will indicate how much memory the site currently needs and then adjust the WP MEMORY LIMIT accordingly. Guide: I would suggest making this adjustment before running WP Menus Sync and translating the menus. Best regards |
January 3, 2025 at 7:11 pm #16562467 | |
desireeH-2 |
Hi Andreas, The pages are translated and published. I tried the WP Menus Sync option, but that showed no changes, and syncing didn't resolve it. Actually, having read that document you sent... it now appears that running the menu sync manually will disable the automatic WP menu creation. I did NOT want to disable that, but it appears I have done so by running that manually. How do I revert this back to fully automatic so WPML may create WP menus? I increased the memory limit (to 256 instead of 128) before doing any of that, but that seems to have made no difference. So it doesn't appear that the manual WP Menu Sync is the solution, and it has no disabled part of my automatic translations. Where do we go from here? |
January 4, 2025 at 1:29 am #16562729 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Thank you for the clarification! The automatic menu translaiton can only automatically translate menus that contain nothing else but pages or other dynamic links. This automatic translation will not do the job if you use custom menu items or additional plugin that add further options to the menus. The same counts for WP Menus Sync. If you are using custom menu items you will need to translate those with WPML > String Translation or direclty inside each menu - the menus will need to be actually translated in this case. Also, in case you use a plugins that add options to each menu, then you need to translate the menus manually and create one menu per language, while setting the options manually in each language. --- If you are looking to revert WP Menus Sync you will need to go to Appearance > Menus, switch the language and delete any translated menu manually. |
January 6, 2025 at 7:08 pm #16567425 | |
desireeH-2 |
So what about the items that are "Post Type Archive" types? These are built-in (WordPress default) dynamic pages that are created for any registered post types that have "archives" enabled, so these ones should work just fine, right? It's just the custom links that require a manual "prod" via the string translation feature. I did spend some time explicitly telling WPML to translate those custom link strings. I was able to find them when searching via the String Translation menu, and queued them all up for translation. However they still don't seem to be getting translated. They will show as "Translation in progress to [language]" in the String Translation page right after queueing them up, but if I view the "Translation Management" page and filter to in-progress items, I don't see any of those ones appearing there. In fact, I see a handful of items here that appear to be old content that's stuck. These items are all mostly translated, but they all have at least one language untranslated that's reporting "[language]: Waiting for translator" even though all of the translations are set to be automatic. Why would it be waiting for a human translator for just a random single language, while it translates all of the others just fine? It's set up to perform translations automatically so I have literally no clue why it would be holding up translations for content for random languages. I think there might be multiple issues going on here, so if I could just hop on a quick call to walk through config settings, I think that would be beneficial to rule out any bugs. I have only used WMPL on a few sites so far so I'm still learning how to navigate these more complex issues, but it's sometimes hard to tell what is a bug vs what is officially supported for automatic translations vs what I need to do manually to accommodate the limitations. |
January 7, 2025 at 1:12 pm #16569599 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
As you are using custom post types, it might be expected that they are treated like custom menu items. In such case WPML > String Translation might be requiered. If you wish, I can set up a WPML test site and we run a test to see if the behavior is expected. If you already created jobs to translate those strings, then you need to access the jobs at WPML > Translations. In case the translation will not work out this way, I can offer to have a look into the site as admin. |
January 9, 2025 at 5:08 pm #16579073 | |
desireeH-2 |
Hi Andreas, I don't see anything in the String Translation for those, so I think it must be something else going on, or I'm just doing it wrong. Would you mind having a look and see if you can find out what is going on? I've set up a dev environment and some credentials for you. The dev site is configured to share the pay-as-you-go translation plan, so that shouldn't hinder you when troubleshooting. ***CREDENTIALS REMOVED BY SUPPORT AGENT*** Let me know if I can provide any further information to assist you. |
January 9, 2025 at 10:14 pm #16579971 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
According to what I see on the backend the menus are expected to show up this way. You can edit the menus directly at Appearance > Menus. Did you already read this guide? |
January 15, 2025 at 7:27 pm #16599139 | |
desireeH-2 |
Hi Andreas, I was just trying to take another pass at this but I'm currently unable to even access the WP Menus Sync page in either the live or dev websites. It times out with a 502 error after a full minute. This is not intermittent, it happens every time. I can't visit the page to reconfigure anything. I disabled all plugins aside from WPML and the WPML helper plugins, as well as the plugins they directly support. This means that WooCommerce and Gravity Forms, among others, remained enabled along with their companion WPML plugins. I also switched to a generic theme to rule that out as well. No luck with any of that, so I queried WPengine support for some additional info, and it appears that WPML is hitting the database super hard and is somehow unable to complete the process before WPengine's long process killer kills the task. The limit is 60 seconds, which I believe is quite standard, so I assume this means that there may be a bug/issue with WPML. I can share my chat transcript with support directly, if you have an email address that I could forward it to. In lieu of that though, I'll just copy/paste some key bits that I believe are relevant for you. Image showing a big mysql spike correlating to the visit to the WP Menus Sync page. The query itself, plus some additional info that appears to be some mysql debug info that I'm not familiar with: it.element_id, it.language_code FROM wp_icl_translations it JOIN wp_posts pt ON pt.ID = it.element_id AND pt.post_type = 'nav_menu_item' AND it.element_type = 'post_nav_menu_item' AND it.language_code NOT IN ('en','bg','zh-hans','zh-hant','hr','cs','da','nl','et','fi','fr','de','el','hu','ga','it','ja','ko','lv','lt','mt','pl','pt-pt','ro','sk','sl','es','sv') JOIN wp_icl_translations io ON io.element_id = 412 AND io.element_type = 'post_nav_menu_item' AND io.trid != it.trid JOIN wp_posts po ON po.ID = io.element_id AND po.post_type = 'nav_menu_item' JOIN wp_postmeta mo ON mo.post_id = po.ID AND mo.meta_key = '_menu_item_object_id' JOIN wp_postmeta mt ON mt.post_id = pt.ID AND mt.meta_key = '_menu_item_object_id' JOIN wp_icl_translations page_t ON mt.meta_value = page_t.element_id AND page_t.element_type = 'post_page' JOIN wp_icl_translations page_o ON mo.meta_value = page_o.element_id AND page_o.trid = page_t.trid WHERE ( SELECT COUNT(count.element_id) FROM wp_icl_translations count WHERE count.trid = it.trid ) = 1 /* From [akbiodev.wpenginepowered.com/wp-admin/admin.php?page=sitepress-multilingual-cms/menu/menu-sync/menus-sync.php] in [/nas/content/live/akbiodev/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/wpml-menu-sync-functionality.class.php:250] */: *** row 1 *** Hopefully this is helpful to you and your team. This is presenting a hard barrier for me to proceed with troubleshooting the other menu issue. |
January 15, 2025 at 11:33 pm #16599430 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
WP Menus Sync is for menus that are registered at Appearance > Menus. In your case, you might not be able to use WP Menus Sync, as you provided a staging site using a Block Theme. In this case, the navigation menus need to be translated with WPML > Translation Management. The same counts for the templates and template parts. Please follow this guide: Please take note that the credentials for this staging were posted publically on this ticket which is why I had to remove them now. |
January 27, 2025 at 9:03 pm #16639328 | |
desireeH-2 |
Andreas, Your last response wasn't exactly very helpful. The menus ARE managed via Appearance -> Menus. It seems like the WP Menu Sync feature is what is needed, but I don't know why that wasn't enabled and automatically translating WordPress menus already. When I originally configured the WPML plugin suite for this ite, I configured it to translate everything automatically, including menus. It worked fine until some items were updated... evidently this appears to be because the WP Menu Sync feature didn't REMAIN enabled after the initial configuration, so it needs to be run manually. Why? I don't know. I presumed it was enabled still based on my original setup. I was able to verify the actual fix for my original issue through further testing on a local environment where the script was not running into max runtime errors. Just running the WP Menu Sync tool appears to resolve then issue (though I only tested this via the new 4.7 release candidate, but it does work on local). I tried using the 4.7 release candidate on the WPengine-hosted dev site once again, to see if the runtime errors were resolved in a newer release, but it behaves the same. I cannot run the WP Menu Sync feature (which appears to resolve my original issue, if it could run successfully) simply because the script takes too long to run and the web host kills the process. How can this be resolved? Everything I can see here points at a bug in WPML. As this same 502 error occurs even with ONLY the WPML plugins activated. If given enough time, it works... but maybe the sheer volume of translations it's trying to display is overwhelming the server? This isn't something I can fix on my end, your plugin's code is literally exceeding the maximum runtime capacity of my web host. If it's not batching this process somehow, it needs to be, as the WP Menu Sync tool is just completely unusable now. So the feature that I need to use to resolve my original issue is broken. How do we proceed? |
January 28, 2025 at 9:23 am #16640479 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, WP Menus Sync is supposed to sync menus that are created at Appearance > Menus and this is only the case when using Classic Themes. On Block Themes the menus work differently and need to get translated with WPML > Translation Management, as they are handled like post types. When working with Block Themes you can run into unexpected issues if you edit templates, template parts, or menus directly in different languages using the Site Editor. If you still experience unexpected issues I would like to request temporary access (wp-admin and FTP) to the site to investigate the issue further. The required fields are below the comment section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it. IMPORTANT If you can't see the "wp-admin / FTP" fields, your post and site login details will be set to "PUBLIC". DO NOT publish the data unless you see the required wp-admin / FTP fields. I may need to install a plugin called "All In One WP Migration" here to create a copy of the site that I can use to investigate the issue further. However, I would also be very grateful if you could provide a staging site or copy of the website from your server for this purpose. If you have any questions about creating such a staging site, you can consult your hosting provider. Please note that WPML must also be registered on this staging site at https://wpml.org/de/account/websites/. If you are not able to provide such a copy of the website for testing, please let me know on this ticket. The private reply form looks like this: The next time you reply, click on "I still need assistance". Best regards |