 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
Can you please try to replicate the reported issue from your last comment on the provided test site?
I created a test post with category and translated them already.
On your test site, the CPT archives lead to:
hidden link
or
hidden link
The CPTs lead to:
hidden link
or
hidden link
|
 nicolasG-15
|
Hi,
It's the same on the parent site. You can see the post "Recipe link test". After publishing or saving, something change the link to .../?recipe_category=test-a instead of .../en/recipes/cat-a-en/test-a/.
|
 nicolasG-15
|
If it's help, it's seem the same as a know issue : https://wpml.org/errata/incorrect-links-for-custom-post-types-and-taxonomies-sharing-the-same-slug/.
|
 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
Thank you!
This seems to have a different cause, as the issue also occurs when the slug is not identical between posts, and the workaround is not solving the issue.
I will try to take a local copy of the site for testing and then get back to you.
|
 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
I am trying to create a site package using Duplicator PRO, but downloading the package of 1GB seems to take like 8-12 hours.
Could you please reach out to the server administrator or hosting support and ask why the downloads are taking such a long time to process?
In the meantime, I will try to recreate this issue in a new sandbox.
|
 nicolasG-15
|
OK I'll ask support, where do you download the package from? To find out if there are bandwidth restrictions by country.
To reproduce the custom post type structure, see :
/inc/post-types/recipe.php (recipe CPT declaraion)
/inc/taxonomies/recipe-category.php (recipe_category taxonomy declaration)
/inc/hooks/recipe.php/ (from line 284, URL structure modifier like recipe_post_type_link())
|
 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
Hi!
I created a sandbox, included a CPT with custom taxonomy, and tried to recreate the issue using the Twenty Twenty-One theme.
So far, I can not confirm this issue on a new test site.
I then installed your theme, ACF PRO, and imported your Field Groups, also made sure that the CPT archive and category slugs are translated and the issue still does not occur on this sandbox.
See post "Test" here:
One-Click-Login:
hidden link
Is it possible to deactivate plugins for testing on your provided Multisite?
Best regards
Andreas
|
 nicolasG-15
|
I can't reproduce the issue on the One-Click-Login website. Gutenberg isn't working on it. Due to an error with lodash in global.js theme script.
For confirme the issue you have to :
1. Create a recipe in default language (EN)
2. Add translation of the recipe (DE)
3. Add link of the recipe in other part of the website with Gutenberg (in post for exemple) OR with classic editor
On my site I've deactivated all plugins except translation and ACF.
|
 nicolasG-15
|
For the record, I did some additional tests.
The erroneous modification of a recipe link is only done in a custom post type, post or a page. If you add a link in a taxonomy term, the issue does not occure.
Perhaps we should look at the save_post action.
|
 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
Take kindly note that I was able to recreate the issue on our sandbox with a CPT and a custom taxonomy and escalated this issue as a bug.
The second-tier support realized that this issue disappears if you go to WPML > Settings > Translate Link Target and run the option to adjust internal links.
Since then, the issue has no longer occurred.
I had earlier mentioned this here:
https://wpml.org/forums/topic/split-modification-of-internal-links-in-gutenberg/#post-17142825
Can you please give this a test on your site? Does this solve the issue on your site?
|
 nicolasG-15
|
I'm sorry but I've just tried twice without success.
You can see with the English version of posts "Test sans Gutenberg" and "Post WPML link test".
|
 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
On your test site, it is currently not possible to edit or add new posts.
Is it possible to disable plugins on this Multisite Network to test what is causing this issue?
|
 nicolasG-15
|
OK let's start from the beginning, you have to "forget" about the first subsite (RCG dispatching) it's just a HUB page for dispatch into the 2 other sites. On the first subsite indeed there is no post, no custom post type you are right.
The posts I talk earlier - and all my tests - is on the second subsite "Professionnal". Here you can do wathever you want.
Same for plugins you have super-admin access rights, I've just checked.
|
 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
Thank you for the reminder!
I will keep investigating and then get back to you.
|
 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
You’ve used:
'has_archive' => _x( 'recettes', 'Recipe archive slug', 'rcg' ),
and:
'rewrite' => [
'slug' => 'recettes/%recipe_category%',
'with_front' => false,
],
This looks like a multilingual slug setup — but _x() is a gettext function, and WPML cannot translate rewrite slugs via gettext (confirmed in WPML docs).
Slug in rewrite is fixed and untranslated
You’ve hardcoded 'slug' => 'recettes/%recipe_category%', but if 'recettes' isn’t dynamically filtered per language, it won’t change when switching languages.
Changing it to this solves the issue but you will need to update the existing translations:
'rewrite' => [
'slug' => 'recettes',
'with_front' => false,
],
'has_archive' => 'recettes',
|