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)
Tagged: Exception
This topic contains 20 replies, has 0 voices.
Last updated by Andreas W. 3 months, 3 weeks ago.
Assisted by: Andreas W..
Author | Posts |
---|---|
May 12, 2025 at 10:36 pm #17024742 | |
erikA-24 |
Background of the issue: Symptoms: Questions: |
May 14, 2025 at 1:59 pm #17032814 | |
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, I apologize for the delay in responding. I will take care of this ticket; the reply time will be shorter now. Yes, updating the page/post should trigger the slug update. You can do it in bulk, following these steps: Best Regards, To ensure the quickest and most accurate support, please provide your debug information so I can look at some of your configurations. We have an excellent article on how to locate it here: https://wpml.org/faq/provide-debug-information-faster-support/. |
May 14, 2025 at 4:09 pm #17033767 | |
erikA-24 |
I've followed these steps on our staging site which is registered to use WPML. I only choose 2 pages. After I select them and click Bulk > Edit > Apply. And then hit update. I do see the pages, Car Accident Lawyer Citrus County, FL and Car Accident Lawyer Hernando County get sent to the auto translate and it runs. But once auto translate finishes, the Spanish slug doesn't change to the Spanish page title. Is this an issue with our staging site? We're not ready to try this on our live site without seeing what it does. |
May 14, 2025 at 6:41 pm #17034103 | |
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, You are right. I am sorry. imho, this is not the expected behaviour, I'll check with our second-tier support. But before that, let me suggest a workaround. You can delete the current translation after switching to "Auto-generate from title (default)". Then, resend the content to translate automatically again. Because of the translation memory feature, you should only be charged for the new strings (slug) translations and nothing for the old content. This flow worked for me, can you please give it a try? Best Regards, |
May 14, 2025 at 8:42 pm #17034383 | |
erikA-24 |
Hi Otto, I can confirm your workaround did work. It's not the most ideal with the amount of content we have so we'll wait to hear back from you. Thanks! |
May 15, 2025 at 4:01 pm #17038008 | |
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, Just to set clear expectations: I escalated the issue to our second-tier support. They will take a look and decide if this is a bug or if it's the expected behaviour. If it's a bug, they will try to provide a workaround if possible and escalate to our dev team. If they can't provide a workaround, the solution may take some time, a it will be queued in our development cycle (according to priorities) and will have a wait until the new version is released. I mention this, so you can decide if the workaround is worthy or if you would rather wait. Best Regards, |
May 15, 2025 at 8:48 pm #17038778 | |
erikA-24 |
Sounds good. I'll bring that up in my meeting with the client next week and we can make a decision on what we will do. |
May 16, 2025 at 12:26 pm #17041637 | |
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, Sure, I hope we'll get some feedback from the second tier before that. They already took a look and agreed that it's a bug. Let's see if there is a better workaround. Best Regards, |
May 16, 2025 at 3:59 pm #17042792 | |
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, In your staging site, can you please try this workaround? In wp-content/plugins/sitepress-multilingual-cms/inc/translation-jobs/helpers/wpml-save-translation-data-action.class.php after line 184 add this: if ( $sitepress->get_setting( 'translated_document_page_url' ) == "auto-generate" ) { $postarr['post_name'] = sanitize_title_with_dashes($wpdb->get_var( $wpdb->prepare( "SELECT post_title FROM {$wpdb->posts} WHERE ID=%d LIMIT 1", $element_id )) ); } Then, resend the page to translate, and it should get back with the slug generated from the translated title. Take into account that this will happen to all the pages you send for translation. You may implement it, re-send all the pages you need to change the slug, and then revert it. Let me know if it worked for you and if it helps. Best Regards, |
May 20, 2025 at 3:39 pm #17053636 | |
erikA-24 |
Hi Otto, Apologies for the late reply, we were on holiday here on Monday. I have tested out your code and for the most part it did work but with some mixed results. I initially couldn't get two pages to force a translation update so these two pages didn't have their slugs updated from the title. I decided to try other pages and they ended up mostly working. Out of 8 pages I tested, 5 worked and 3 failed. There is one page that has the same title as another page (different slugs though) and I suspect the same title might be conflicting with it. The other two I tried and failed, didn't force a translation update like I mentioned before. |
May 21, 2025 at 1:39 pm #17057824 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, My colleague Otto is on vacation, which is why I am assisting you today. The problem here might be, that you have set slugs to "Translate" which will make them appear inside the WPML Translation Editor. Once the slugs are translated automatically, they are saved inside the translation memory of the Advanced Translation Editor. Now, you switched the setting to "Auto-generate from title" which should lead to the fact, that the slug no longer exists on the translation editor. But in order to update the UI of the Advanced Translation Editor, you would need to edit the original title or maybe even the slug of the original page, then save the page again. This will change the translation status to "Update needed" and then the automatic translation should complete the translation without translating the slug again. The automatic translation might not update anything if the status of the page is "Completed" when sending it again to automatic translation. Please give this a try and let me know if further assistance is needed. Best regards |
May 21, 2025 at 9:07 pm #17059110 | |
erikA-24 |
Hi Andreas. I was able to get 5 of them to work without editing anything. I selected them to edit in bulk and hit the update button (no changes) and those were able to translate after updating the code that Otto provided. Your alternate solution unfortunately would not work for us as we are looking for a solution that we can update the slugs in bulk. |
May 22, 2025 at 1:17 am #17059297 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
There is nothing else I can offer at this point and I believe my last comment very explained the possible issue in regards to ATE's translation memory. Could you please follow my suggestion? You can bulk edit any posts and pages in WordPress. Updating the original posts or pages should trigger the translation status to "Update needed" and remove the slug from ATE's translation memory. Then update the translations. |
May 22, 2025 at 10:00 pm #17063620 | |
erikA-24 |
Hey Andreas, Your suggestion does work but we have over 1200 posts/pages of content and cannot update every title or slug just to get the auto title slug translations to work. That would be way too time consuming and Otto's other suggestions would work better in that case. As for your last point. Otto had suggested that as well and we both tried it and it didn't work. Otto confirmed with secondary support that it is a bug. Thus Otto sending me his latest suggestion with some code edits to help find a workaround where I had mixed results. I was hoping to get some insights on why it worked on some and not others to continue with this workaround. Thanks! |
May 23, 2025 at 7:41 am #17064528 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
My apologies, I was consulting the second tier support as I was going to provide a workaround for this specific issue, but this is somehow out of scope for me or the second their support. The issue has been escalated to the dev team already and will be properly solved in a future update for WPML. |