Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

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.

This topic contains 18 replies, has 2 voices.

Last updated by Otto 3 years, 4 months ago.

Assigned support staff: Otto.

Author Posts
September 6, 2016 at 1:04 pm #1062993

patrizio-romanoD

I am trying to: translate custom taxonomies and post types

URL of (my) website where problem appears: I prefer to share URLs privately, I will provide any access - WP Admin, FTP and Database - as soon as you will tell me how to send you this informations.

Anyway for example:
mysite.it / custom_post_slug / post_name
and its translation:
mysite.it / en / [translated] custom_post_slug / post_name
looks fine;

the issue happens when trying to reach any url managed by php templates of mines, both in original language and in english translation, like:

mysite.it / custom_post_slug /
mysite.it / en / [translated] custom_post_slug /
mysite.it / en / categories-slug / category /

I also found a WordPress database error notification in Translation Manager panel [Illegal mix of collations for operation 'UNION'], and tried to solve following the steps described here, but no luck:
https://wpml.org/forums/topic/translation-management-does-not-displaying-any-documents/

At the moment I think the white page issues are caused by something wrong in php templates I modified myself in order to customize the taxonomy pages, but I still can't get it through, so thanks for any help you could provide.

September 6, 2016 at 2:57 pm #1063378

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thank you for contacting the WPML support!

When WPML is deactivated the issue is gone, right?

Can you please do the following:
-Please follow the debugging information provided here:
http://wpml.org/documentation/support/debugging-wpml/
- Repeat the action: go to the pages where the blank screen is showing
-Copy and paste the contents of debug.log here for me to see, you may want to use pastebin.com

Also, can you please do this test:
-Back up your site first
-Deactivate all the plugins that are not related to WPML, if your CPT is created in a plugin keep it active
-Switch for a moment to a WordPress default theme like Twenty Fourteen, if the CPT is created within the theme copy the code to the Twenty Fourteen functions.php file
-If the issue is gone, activate one by one to see with which one there is an interaction issue

Thanks for your cooperation.

Let me know your results, please.

Kind Regards,

Otto

September 6, 2016 at 5:02 pm #1063690

patrizio-romanoD

Hey Otto,

thanks for your quick reply.
After struggling with plugins I succeded in finding a single notice about a theme file missing.
Stranger things: when on the white pages, I wasn't able to create even a debug report.
Deactivating / Reactivating some plugins made me reach for that notice.
Now it looks like URL are working, except for a taxonomy where I used a rewrite_slug via CPT UI, looking like overriding any other function and keeping that URL portion stuck on that term, no matter which language you switch to.
As I suppose there could be a conflict with the X theme I'm using, because of that missing file, so I reported to their team for a check.
Could you please give a look here as well - hidden link - where I gave some further information about what happened?

How could I send you some information privately, to make you see the website and not only my descriptions?

Thanks!

September 6, 2016 at 6:28 pm #1063838

patrizio-romanoD

In the meantime I was able to activate debug bar plugin on my administration and to re-activate the function creating the debug.log file.
Let me know how to send it to you.

September 6, 2016 at 8:18 pm #1063978

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thank you for the explanation.

Please provide me the steps I should follow to see the issue on your site.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok for you.

** IMPORTANT **

- Please make a backup of site files and database before providing us access.

- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:

hidden link

Kind Regards,

Otto

September 7, 2016 at 1:44 pm #1065737

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

It seems to be a conflict within WPML and X theme.

With WPML deactivated "tessuti" and "colors" looks fine.

With WPML active and the Twenty Fifteen theme also. I think I can't switch languages there because there is no Tessuti post type already translated

I noticed that you are not using the latest version of the X theme, can you please update it and check if the issue persists?

If this is not what you are asking, can you please elaborate a little more so I can better understand? Sometimes screenshots illustrating what you mean may go a long way to clarify what words fail to transmit so if you like make use of “upload an image” below the comment area.

Kind Regards,

Otto

September 7, 2016 at 2:14 pm #1065808

patrizio-romanoD

Hi Otto, thanks for your reply.

I try to be much clearer.
Regarding your considerations:
With WPML deactivated I've seen no issues.
With WPML active but any other theme, you cannot see my custom posts and custom taxonomies, as I built them inside the child theme folder - I'm not glad I still not changed this part into a plugin.

Now: I made a complete update for X theme and any other plugin requesting.
I also reactivated my child theme.
Issues still there.

Please consider the following:

At the moment I set up everything in order to start a complete translation, BUT, I only translated a single post and followed WPML knowledge base in order to make it have its taxonomies translated too.
The post is this one, title 2BQ, you can find it inside the SUNCOLOR custom post types.
It has been translated in english, only, with a little text change just to see it was working 🙂
The taxonomy it belongs to, and its own custom post type slug too, has been translated using WPML Translation Manager and String translation - or, I hope so, please have a check 🙂

To reproduce issues and errors:

Single post, working fine with the right front end output, here
hidden link
Same post, translated, working fine with the right front end output, here
hidden link
Taxonomy, not working anymore
hidden link
Its translation, not showing anything until using the /index.php inside my child theme
hidden link
Custom post type archive template, not showing as well
hidden link
Its translation, same as above
hidden link

So, it is into those taxonomy pages that you can see errors.
Please see also the Debug.log text file here
hidden link

Sorry if I was not as clear as I could before, thanks again for your support.

September 7, 2016 at 6:43 pm #1066460

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks a lot for the explanation. I'm afraid I still need some more, though...

I changed to Twenty Fifteen, and the CPT's and taxonomies are still there. They don't have a custom display on the front end, but they are still showing (back and front end)

All the links you shared seem to be working fine for me, using the custom WP theme.

The same happens using the parent X theme.

So, it looks like the CPT's and taxonomies are not created by your child theme.

Can you please check that?

Kind Regards,

Otto

September 7, 2016 at 6:58 pm #1066470

patrizio-romanoD

You're absolutely right Otto.

CPT are created using CPT UI plugin; so after switching to Twenty fifteen they're showing up.
What I meant, and really not explained well, is that layouts for single posts, archive and taxonomy pages are created using customized php templates inside my child theme folder.
So it's probably something going wrong right there, with my own php templates or maybe caused by X theme itself.
Any clue about that? 🙂

September 7, 2016 at 8:05 pm #1066567

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

It looks like it's only with your child theme. I tested with the parent and it's working too.

Custom coding is outside the scope of our support and, probably, beyond my capabilities. Anyway, I will be more than happy to help as far as I can.

You can solve the mix of collations following the steps provided here:
https://wpml.org/forums/topic/subcategories-are-disappearing-in-one-language/

The other errors don't seem related to WPML, although is a mystery to me why it works when WPML is not active.

Can you please try the solution for the illegal mix of collations and then we will continue.

Any news from the theme support?

Let me know your results, please.

Kind Regards,

Otto

September 7, 2016 at 8:10 pm #1066570

patrizio-romanoD

Let me say I'm really happy with your helpfullness, Otto.
Going to try that solution for mix of collation right away. Still waiting for the theme support reply.
Looking forward for the next step - hopefully, a solution 🙂
Thanks,
Patrizio

September 7, 2016 at 8:36 pm #1066589

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello Patrizio,

Let me know how it goes and if you get feedback from the theme support, please.

I hope that too 🙂

Kind Regards,

Otto

September 7, 2016 at 10:34 pm #1066647

patrizio-romanoD

Hello Otto,

so the theme team is still trying on its website copy, meanwhile I've done the following:
via phpmyadmin changed every single database table, in order to have each collation the same as those I found was set for WPML's tables - utf8mb4_unicode_520_ci (Multilingual).

This didn't had any effect, even the error message [Illegal mix of collations for operation 'UNION'] on Translation Manager panel is still there.
What about the tables the panel message is mentioning?
Could it be something related to some cells collation, more specifically? - sorry, not a database expert here 🙂

To reproduce completely the same step mentioned in the solved post you suggested, lastly I also tried to create a new category and its translation (debug, debug eng), and assign it to a new translated post.
Anyway, errors with taxonomies are still there:
hidden link
hidden link

I tried also to test the same behaviour with a different CPT and its Custom taxonomies, see:
hidden link
hidden link

If you try to reach for 'tessuti' / 'fabrics' taxonomies, same as above.
Any single post type, anyway, looks just fine and translatable, as in this CPT 'pergolas' with no Custom Taxonomy at all - but with a archive-pergole.php template, failing as the others, see:
hidden link
hidden link

I'm wondering if something is occourring just into my php archive-slug and taxonomy-slug templates.

September 8, 2016 at 8:52 am #1067352

patrizio-romanoD

Hey Otto, good news from the X team, please take a look - hidden link
I made the same change on the testing installation on your side and it's working as well.
Let me say I'm absolutely happy with you and WPML support, I would not find a way to get the X team right to that issue without your help and suggestions. 🙂

I now need assistance for two remaining matters, mainly this one:

why this URL part, a category-slug, keeps not being translated, despite of WPML configuration?

See how it is:
ENG
hidden link
ITA
hidden link

How I expect it should be:
ENG
hidden link

I made a check into WPML configurations:
String translations - searching for 'categorie tende', it looks translated, see screenshot
Taxonomy translation - it looks translated, see screenshot

Consider also: this taxonomy WAS set via CPT UI to be overwritten, using rewrite_slug, into "categorie-tende-da-sole"; anyway, now I disabled that rewrite_slug.

Second, minor (?) issue: in Translation management panel, the [Illegal mix of collations for operation 'UNION'] message is still there, despite my collation changes on database.

Thanks!
Patrizio

September 8, 2016 at 11:35 am #1068225

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello Patrizio,

I'm really happy that you managed to solve such a tricky issue. And glad to hear that I helped you to achieve that.

As the original issue is resolved may I kindly ask you please to open a new ticket for your new question? This way we will be able to help you better and also help other users with similar problems find solutions when searching the forum.

When opening a new ticket, you will be able to assign it directly to me, if you wish.

Thank you!

Kind Regards,

Otto