Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:

When the Portfolio slug is translated, links to a portfolio posts go to the default post

Solution:

The problem happens when translating the pages that include the portfolio links with WPML's Classic Translation Editor. Please use WPML's Advanced Translation Editor to translate pages with the portfolio links. Then the links on the translated pages will point to the translated portfolio items.

Relevant Documentation:

https://wpml.org/documentation/theme-compatibility/using-wpml-with-the-avada-theme/

https://wpml.org/documentation/translating-your-contents/advanced-translation-editor/

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.

No supporters are available to work today on this forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 27 replies, has 2 voices.

Last updated by dosvisual.com 2 months, 1 week ago.

Assigned support staff: Itamar.

Author Posts
April 22, 2021 at 6:56 pm

dosvisual.com

1. I'm experimenting some translation problems with the portfolio links. ON this page hidden link there are links to the portfolios in Cat (below the videos). I translated the page, but the ESP translation for the links sometimes point to ESP and sometimes to CAT..check this page please hidden link

2. I created a button as a global element in Avada, then translated it. But it's not showing the translations on the ESP and ENG versions.. this is the main language page hidden link the global button is the one above the video "Edició 2020". This is the ESP version with the untranslated button> hidden link

April 22, 2021 at 8:12 pm
April 25, 2021 at 6:30 pm #8618501

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I'll continue to help you with this issue.

I checked things on your site and could see that at least one of the links you showed that was wrong now is OK. I'm talking about this link.

hidden link

When I go to the page you shared with us at the following link and press this link; I get the correct language. Please see the attached screenshot El-hombre-nuevo.jpg.

hidden link

I could see some links that are still not directing to the Spanish translation. But it looks like it is because their translations are not complete or need an update. Please see the attached screenshot trans-need-update.jpg.

Please complete the translation of the Spanish and English portfolio items. When a translation is complete, the pencil icon is shown. Then please make a small change to the original page Mostra FIRE!! - Fire at home 2020 and also update its translations. Now the links should work fine.

Can you please try this and let me know if it is working for you?

Regards,
Itamar.

El-hombre-nuevo.jpg
trans-need-update.jpg
April 26, 2021 at 9:30 am #8622239

dosvisual.com

Hello Itamar
Thanks for your reply.

A) "I checked things on your site and could see that at least one of the links you showed that was wrong now is OK. I'm talking about this link.
hidden link "

--> Have you checked on the back end? I set it manually in spanish, this is why it is working. Please check this on the translation editor and also the other links, which do not work (only some of them, randomly).

B) "I could see some links that are still not directing to the Spanish translation. But it looks like it is because their translations are not complete or need an update. Please see the attached screenshot trans-need-update.jpg."

--> Thanks for the tip. Please note I´m an advanced Wpml user so i already know the basics ;). I had this same issue last year and have been waiting for it to get solved with the updates, but it didn´t.
I´ve been working on the website since I opened the ticket, modifying things to make them work despite the bugs (I have another open ticket for translation problems with global elements). So, I can say the translations that require an update are not the problem.

Can you please take a deeper look at the issue? I need to publish this page/s urgently, but can leave it/them with the bugs for one more day if it´s useful for you to debug, and I would appreciate it finally gets solved as it´s really slowing down the workflow.
I´ve made a duplicator copy of the website before doing manual fixes. please let me know if you prefer to use that one instead.

Thanks

April 26, 2021 at 11:12 am #8623715

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I prefer to debug this issue on a copy of your site and not on the live site. For this, I created a temporary server where you can migrate your site to. The migration process is quite easy. Please see the detailed instructions in the following private reply.

Thanks,
Itamar.

April 26, 2021 at 11:13 am
April 26, 2021 at 2:24 pm #8626553

dosvisual.com

Hello Itamar
Thanks for the staging site, the migration is complete.
Please let me know if you need further information.
Thanks

April 26, 2021 at 4:45 pm #8628223

dosvisual.com

Hello Itamar
I know I need to open one ticket per issue, but this one is related, and you are already working on it, so I hope you can take a look at this too.

1) On the ENG page> hidden link the portfolio element filter is not displaying one of the categories "Featured films 2020", which is being correctly displayed on both ESp and CAT. I checked the translation status of te portfolio, but that does not seem to be the reason..

2) I´m having to regenerate the permalinks when i do changes on the portfolio pages, because they break and show up as 404... I´ve always had problems with Avada portfolio slug and Wpml in this and other websites.. maybe it is influencing on the links translation..?

Thanks

portfolio-element-filter-category-missing-ENG.png
April 27, 2021 at 10:00 am #8632951

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi and thanks for migrating your site to our server.

I'm checking now the original issue with the links. If my findings will not lead to also solve the other issue you bring in your last reply then we will need to handle it in a new split ticket.

I'll update you here.

Itamar.

April 27, 2021 at 1:42 pm #8635549

dosvisual.com

Ok, thank you Itamar!
Good luck with it!

April 27, 2021 at 6:11 pm #8638211

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I've tested this issue on a fresh WordPress installation with WPML and Avada and couldn't replicate this issue. So it is was only happening on your site. I investigated the issue further and found out the source of the problem. The root of the issue is a known problem that was fixed in the past. This is the link to the errata page we published.

https://wpml.org/errata/avada-translated-global-elements-are-not-being-translated-on-frontend/

The fix for this issue was already included in the files of the Fusion Builder plugin. But on your site, the file with the fix, in addition, included the old workaround from the errata page.

I could fix it on the copy of your site. Please see it here.

hidden link

Please see the attached screenshot es-link-ok.jpg.

Here is what you need to do on your site to fix this issue.

1. Take a full backup of your site.

2. Edit this file with a code editor.

wp-content/plugins/fusion-builder/shortcodes/fusion-global.php

3. Remove the following line:

/* wpml fix for global elemnts*/ $this->args['id'] = apply_filters('wpml_object_id', $this->args['id'], 'fusion_element', true);

Please see the attached screenshot fusion-global.jpg.

4. Save the changes.

5. Go to Avada -> Options -> Portfolio -> General Portfoio -> Portfolio Slug and save the settings on this page.

6. Go to Settings -> Permalinks and re-save the permalinks. (You might need to change the permalink to 'Day and name'. That is what I did on the copy of your site). Please see the attached screenshot Day-and-name.jpg.

7. Go to WPML String Translation and search for 'pellicula' (the slug of the Portfolio custom post type). There, you might find two instances of this string.

8. Finish the translation of the slug. I could see that it needed an update. Please see the attached screenshot st-wrong-slug.jpg.

9. Make a small change to the original page and press the Update button.

10. Then also Update the translation.

Now the links of the Portfolio items should be correct in Spanish.

Please let me know if it is working for you.

Regards,
Itamar.

st-wrong-slug.jpg
fusion-global.jpg
es-link-ok.jpg
Day-and-name.jpg
April 28, 2021 at 9:01 pm #8648499

dosvisual.com

Hello Itamar
Thanks for the workaround.

I will try what you suggest, but you should know I added that fix in the code of wp-content/plugins/fusion-builder/shortcodes/fusion-global.php a couple of days ago following the suggestion of the chat supporter.. and the problem was happening before that also..
I have another open toicket just for the global elements> https://wpml.org/forums/topic/global-element-not-showing-translated/

--> hidden link > is full of errors.. is that ok?

--> es-link-ok.jpg > the translated links point to "/es/pellicula" (that is the catalan slug) when it should point to "/es/pelicula" (that is the correct spanish slug)..

6) I don´t want to change the posts permalinks to day/month...it is not a desired structure and it would ruin the Seo... is that what you really meant? I see that is what you´ve done on the staging site.. So far, I´ve just resaved the old structure.

7) The portfolio slug is already correctly translated on the live website. CAT> pellicula ESP> pelicula ENG> film

8) More bugs> Now I reached the step of updating the CAT page. I just added one "." to a button. Then opened the ESP translation and the previous translation has been reset to CAT (that is an old bug that was supposed to be fixed too). I had to undo the change on the CAT page, then the ESP translation was restored.

Anyway, I´ve updated the 3 pages. Same result 🙁

cloudstaging-errors--.png
portfolio-slug-is-correct.png
previous-esp-translation-reset.png
April 29, 2021 at 10:21 am #8652447

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Thank you for the detailed response.

I'm checking the issue and will update you here.

Thanks,
Itamar.

April 30, 2021 at 12:46 pm #8662793

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I have an update about this issue. I was able to replicate the issue on a fresh WordPress installation with Avada and WPML. The problem happens when the Portfolio slug is translated. If the slug is translated, then links inserted in a Text Block element are not pointing to the translation of the portfolio items. They are leading to the original portfolio item.

I'm escalating this issue to our compatibility team. Once I have news regarding this issue, I'll update you here.

As a temporary workaround, you can delete the translation of the portfolio slug in WPML -> Settings -> Post Type Translation. Just delete the value from the fields and press the save button. You might also need to go to WPML -> String Translation and delete the 'pellicula' strings. Search for 'pellicula' with the option 'Exact match' selected, and you will quickly find the two. Then go to the original page and make a small change to trigger an update to the translation. Press the Updated button and then also update the translation to be 100% complete. I tried it on the copy of your site, and it works. Please see it here.

hidden link

Regards,
Itamar.

April 30, 2021 at 5:59 pm #8664587

dosvisual.com

Hello Itamar
Thanks for your message.

I´m not sure I´m understanding your workaround.. if I check the page you mentioned, I still see the links to the translated portfolio with a wrong slug:

Now > hidden link.../es/PELLICULA/el-hombre-nuevo/
It should be> hidden link.../es/PELICULA/el-hombre-nuevo/

I will wait until you have a reply from the developers...
Many things are failing at the moment on this website (you can check my other tickets for reference), so I think they need to take a deep look at it...
Please remember it´s been created on July 2020 with a fresh installation of theme and plugins.. hope that helps.
Thanks