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 3 replies, has 2 voices.

Last updated by joM-4 2 months, 3 weeks ago.

Assigned support staff: Marcos Vinicios Barreto.

Author Posts
July 15, 2019 at 9:46 pm #4214697

joM-4

I am trying to: Translate the 'Home' Yoast breadcrumb

Link to a page where the issue can be seen: hidden link

I expected to see: Breadcrumbs of "Home > Locations"

Instead, I got: Breadcrumbs of "Inicio > Locations"

I have read some solved tickets around this, but not of them seem to address our problem. The default site language is English and we're trying to translate the breadcrumbs to Spanish. The "Home" text is appearing in the WPML string translations, but when we enter Spanish translation of 'Inicio' it is affecting both the English AND Spanish pages. It's also notable that when we then go into the Yoast SEO breadcrumb settings, the Spanish translation actually shows on that admin screen as the current setting.

Please can you advise on this?

Many thanks,

Andy

July 16, 2019 at 12:45 am #4214879

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for contacting WPML Support. I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. 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.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**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

Please, let me know if you need any additional details. Have a nice day.

July 19, 2019 at 1:01 am #4242745

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Please, take a look at my private reply above. Thanks!

July 20, 2019 at 5:03 pm #4250355

joM-4

This was extremely difficult to resolve and took a number of hours.

I used the test website that you set up to try and identify the problem, but things worked fine on the test website. To do this I had to install/activate some plugins and to customise the theme to show the breadcrumbs. I also cross-checked all the plugin versions.

I then went back to the lingolocate site and disabled most of the plugins. This still didn't help. I then switched to the twentynineteen theme (customising it to show breadcrumbs) and still the problem was there. I find that as soon as I view a page in Spanish it's actually updating the Yoast SEO home breadcrumb setting from 'Home' -> 'Inicio'.

At this point I think that just viewing the page in Spanish must actually be doing a database update which is updating the Yoast SEO settings. To try and track this down I installed the Query Monitor plugin. Using this I found that just viewing a page in Spanish was triggering this database update (I've only included part of the update statement):

UPDATE `wp_options`
SET `option_value` = '......s:16:\"breadcrumbs-home\";s:6:\"Inicio\";......'
WHERE `option_name` = 'wpseo_titles'

I traced this back to the plugins/wordpress-seo/frontend/schema/class-schema-context.php code:

	/**
	 * Determines what our site represents, and grabs their values.
	 */
	private function set_site_represents_variables() {
		$this->site_represents = WPSEO_Options::get( 'company_or_person', false );

		switch ( $this->site_represents ) {
			case 'company':
				$this->company_name = WPSEO_Options::get( 'company_name' );
				// Do not use a non-named company.
				if ( empty( $this->company_name ) ) {
					$this->site_represents = false;
					break;
				}
				$this->company_logo_id = WPSEO_Image_Utils::get_attachment_id_from_settings( 'company_logo' );

I think it's basically just trying to save the attachment id setting for the 'company_logo', but because all of the settings are stored in the same field then it needs to get all of the existing settings first so that it can save them along with the updated field. When it gets the current settings, including 'Home' for the breadcrumbs-home, it's actually going through the translation, so it's basically replacing all of the Yoast SEO admin settings with their Spanish translations!

In the end I'm not sure whether this is a bug in WPML or in Yoast SEO.

To get around this for the moment I've just removed the 'Organization Name' of 'Lingo Locate' from the Yoast SEO general search appearance settings.