WPML Language no longer visible

Hello!

I recently changed a site’s WPML settings (separate languages in separate directories) and now for my shop items, in the default language the products inside the categorie no longer appear when I click into them, I get a blank page. They do appear for the secondary language (English). If I go into the categories on English, I no longer see the translation available for selection in the menu.

Please help? Thanks!

Hi @newbasecynth,

Thanks for reaching out.

It’s site’s internal error unfortunately, it’s not viewable from the site. Please edit your site’s wp-config.php file through your hosting’s file manager or just FTP and set the WP_DEBUG to true within that file.

Then let us know so we could see the actual error that may help our troubleshooting.

Thanks!

Hi @Rad, appreciate your quick response.

WP_DEBUG is now set to true. Thanks!

Hi @newbasecynth,

Since there is no SEO plugin, then the WPML SEO Option should be toggle off too.

I turned it off but another error appears, now it’s related to language switcher and I can’t find what’s causing it.

Could you try contacting WPML author and see if they can find more details about the error? Could be related to custom language switcher too but I don’t like to touch it settings as I’m not fully familiar with its features.

Thanks!

Hi @Rad, have checked with the WPML author and they resolved the issue of the pages not showing up and also the language switcher appears to work.

However, now it seems that some of the categories have gone funny. For example: this product now shows up only if I view it directly from the products page, and it also comes with an error on the top of the page.

NOTICE: UNDEFINED VARIABLE: POST IN /HOME/NEWBASEHK/PUBLIC_HTML/WP-CONTENT/THEMES/X-CHILD/FUNCTIONS.PHP ON LINE 42

NOTICE: TRYING TO GET PROPERTY OF NON-OBJECT IN /HOME/NEWBASEHK/PUBLIC_HTML/WP-CONTENT/THEMES/X-CHILD/FUNCTIONS.PHP ON LINE 42 SHOP CARMANS CLASSIC FRUIT & NUT MUESLI BAR

It does not appear if I try to view the category in the English version of the site. This is happening for several categories, and the language switcher is appearing on some pages but not others (even though the products each have both Chinese/English translations).

Thanks for your help.

Hi @newbasecynth,

From your child theme’s functions.php, please change this

function get_breadcrumb_category( $cat ) {
   $post = get_post( $post->ID );

to this

function get_breadcrumb_category( $cat ) {
   global $post;
   $post = get_post( $post->ID );

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.