Skip Navigation

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.

WordPress 6.7 has introduced a new issue that impact translations, please update WooCommerce and WPML to the latest versions before you report issues. More about this here - https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/
Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - -
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - -

Supporter timezone: Asia/Jerusalem (GMT+02:00)

Tagged: ,

This topic contains 18 replies, has 2 voices.

Last updated by Itamar 2 months ago.

Assisted by: Itamar.

Author Posts
August 24, 2024 at 8:12 pm #16100627

dennisH-9

Background of the issue:
I am trying to translate a page that should show up in Dutch: hidden link. The Translation editor says the translation is complete: hidden link.

This is a staging-site, so I'd be happy to share credentials if there's a option to add a private note.

Symptoms:
The translation doesn't show up on the front end.

Questions:
What bug of mis-configurations is causing the front-end not showing the completed translation?

August 25, 2024 at 4:41 pm #16101712

Itamar
Supporter

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

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

Hi,

I can see this issue on your site.

I also delivered the job from our side. This can be a caching issue. Please clear the caching on your site and see if it helps.

Otherwise, if you need further help with this, please send me the access details to your site. I'm enabling a private message for the following reply.
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 backup the site files and database before providing us access. --
-- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.--

Regards,
Itamar.

August 26, 2024 at 7:25 pm #16106716

Itamar
Supporter

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

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

Hi, and thanks for the access details.

I can see that the translation exists in WPML's Advanced Translation Editor but does not appear at the form end.

However, something is still unclear to me. When I edit the English page, I only see page settings, not the content itself. Please see the attached screenshot.

Can you please explain to me how to see this page's content?

I want to check if there is a compatibility problem by seeing which elements/modules you are using. The problem might be related to this known issue.

https://wpml.org/errata/x-theme-cornerstone-certain-widgets-are-untranslatable-using-advanced-translation-editor-ate/

Thanks,
Itamar.

2024-08-26_22-10-26.jpg
August 26, 2024 at 8:38 pm #16106790

dennisH-9

Hi,

thanks for the swift response.

To edit the page content in its original language: go to hidden link, find the page and select 'Edit with Cornerstone'. That will redirect you to hidden link.

August 27, 2024 at 8:45 am #16108352

Itamar
Supporter

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

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

Thanks.

I can see the translations when editing with Cornerstone. Please see the attached screenshot cornerstone.jpg. But indeed, they still don't show on the front end. I'm consulting our second-tier supporters about this.

However, I can also see that the Pro theme by Themeco has not been updated to its latest version on your site. Please see the attached screenshot pro.jpg.

While I consult our second-tier supporters, can you please update the theme to its latest version and see if that fixes the issue?

Thanks,
Itamar.

cornerstone.jpg
pro.jpg
August 27, 2024 at 7:27 pm #16112008

dennisH-9

Hi,
the Theme is updated. Thanks for reaching out to the second tier support.

August 28, 2024 at 8:02 am #16113061

Itamar
Supporter

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

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

Hi,

Thanks for updating the theme.

Our second-tier supporter found out that the problem on your site is known. It is happening because you are using Cornerstone's Classic Text widgets. Please see the attached screenshot. We explain it in the following link and share two suggested workarounds. Please read the errata, choose one of the proposed workarounds, and apply it to your site.
https://wpml.org/errata/cornerstone-classic-widgets-translations-not-displayed-on-front-end/

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****

Regards,
Itamar.

2024-08-28_10-57-14.jpg
August 28, 2024 at 8:59 pm #16117140

dennisH-9

Thanks Itamar, that helped a lot.
Actually I think it wouldn't be a bad idea to replace all 'classic' elements with their newer versions, if that solves the WPML issue at the same time.

For testing, I've added a new headline element, just below the classic headline. The new headline is the one in black.
The headline itself is translated and shown on the front-end like it's supposed to. So that seems to do the trick!
The headline also has a sub-line, and that isn't present on the front-end and isn't working as it should. Could you please look into this?

August 29, 2024 at 3:36 pm #16121086

Itamar
Supporter

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

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

Hi,

I'm glad that it helped!

Thanks for reporting the subheadline problem. I could replicate it on a test page on your site here: hidden link. I'm consulting our second-tier supporter about this and will update you here when I have news.

Please note that my weekend is Friday-Saturday, and I'll be able to continue to check this issue and help you on Sunday.

I appreciate your patience.
Itamar.

August 29, 2024 at 9:37 pm #16122257

dennisH-9

Hi Itamar,

I'm glad you've been able to reproduce the issue and you're discussing it with your colleagues. So far I'm very happy with how you're picking up on my question and how we're really getting close to solve it!
I'm going to replace 'classic elements' on several pages, hoping that will fix the majority of the translations not showing up front-end. But it may take me some days, or even more, cause I have to find time somewhere.

I appreciatie you letting me know you'll be having a few days off, and I totally understand that. Having a few personal days each weeks is important.
Enjoy your days off!

August 30, 2024 at 8:29 pm #16126305

dennisH-9

Hi,

I've spend some time on updating several pages. I've replaced the Staging-website with the most current version that's running live. Credentials are unchanged.
But when I finished, I wondered something.

With the problematic pages, the issues indeed seem to resolve when replace the theme's Classic-elements with the modern versions. But all the other pages also still use the Classic-elements, and they show up translated just fine. See for example the homepage.

So i'm wondering if we really got to the root of this issue: so far you stated that the Classic-elements are the actual problem, but since they show translations on other pages just fine, I'm starting to doubt that.
I'll continue replacing classic-elements on problematic pages, because it does seem to fix things, but I also would like to hear your thoughts on why classic elements don't seem to be problematic on for example the homepage.

Please also see hidden link: the titles of the accordions are translated, but their content is not. This time it's also not translated at the backend, looks like the accordion's content is simply not recognized by WPML.

September 1, 2024 at 9:23 am #16128610

Itamar
Supporter

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

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

Hi,

The subheadline issue
I am sorry for any inconvenience this caused you. This is another known issue. As a workaround, you can achieve the same result by adding your content only to the main field and using the Rich Text mode. You can see it here and check the suggested workaround.

https://wpml.org/errata/pro-theme-subheadline-feature-not-available-for-translation/

We've reported this issue to Themeco; they should fix it in their code.

Your concern if you got to the root of the issue
I can assure you that since the suggested workaround fixes the issue, we got to the root of it.

The problem was identified as being with the classic headline and classic text. On your homepage, you use the 'Classic Feature List' widget, which may work fine.

The content of the accordion issue

Again, I'm sorry. It seems like another known issue we have, which you can read about here.

https://wpml.org/errata/x-theme-cornerstone-certain-widgets-are-untranslatable-using-advanced-translation-editor-ate/

The errata does not mention a workaround. Therefore, I'm consulting our second-tier supporter about the workaround we can provide. I'll update you here once I have it.

I appreciate your patience.
Itamar.

September 3, 2024 at 7:51 am #16134262

Itamar
Supporter

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

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

Hi,

Here is the workaround suggested by our second-tier supporter.

1. Take a backup of your site in case something goes wrong.

2. Open this file with a code editor: .../sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Cornerstone/class-wpml-cornerstone-register-strings.php

3. Look for line 13.

4. Change:

			if ( isset( $data['_type'] ) && ! Utils::typeIsLayout( $data['_type'] ) ) {
				$this->register_strings_for_node( Utils::getNodeId( $data ), $data, $package );
			} elseif ( is_array( $data ) ) {
				$this->register_strings_for_modules( $data, $package );
			}

To:

			if ( isset( $data['_type'] ) && ! Utils::typeIsLayout( $data['_type'] ) ) {
				$this->register_strings_for_node( Utils::getNodeId( $data ), $data, $package );
				if ( $data['_type'] == "accordion" || $data['_type'] == "accordion-item-elements" ) {
					$this->register_strings_for_modules( $data, $package );
				}
			} 
			elseif ( is_array( $data ) ) {
				$this->register_strings_for_modules( $data, $package );
			}

5. Save the change.

6. Open this file with a code editor: .../sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Cornerstone/class-wpml-cornerstone-update-translation.php file.

7. Look for line 8.

8. Change:

	public function update_strings_in_modules( array &$data_array ) {
		foreach ( $data_array as $key => &$data ) {
			if ( isset( $data['_type'] ) && ! Utils::typeIsLayout( $data['_type'] ) ) {
				$data = $this->update_strings_in_node( Utils::getNodeId( $data ), $data );
			} elseif ( is_array( $data ) ) {
				$this->update_strings_in_modules( $data );
			}
		}
	}

To:

	public function update_strings_in_modules( array &$data_array ) {
		foreach ( $data_array as $key => &$data ) {
			if ( isset( $data['_type'] ) && ! Utils::typeIsLayout( $data['_type'] ) ) {
				$data = $this->update_strings_in_node( Utils::getNodeId( $data ), $data );
				if ( $data['_type'] == "accordion" || $data['_type'] == "accordion-item-elements" ) {
					$this->update_strings_in_modules( $data );
				}
			} elseif ( is_array( $data ) ) {
				$this->update_strings_in_modules( $data );
			}
		}
	}

9. Save the change.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****

This should solve the accordion content issue.
Please let us know how it goes.

Thanks,
Itamar.

September 6, 2024 at 8:33 pm #16150431

dennisH-9

Hi,

thanks for getting back to me again and splitting up the topics.

The subheadline issue
Regarding the Headline issue, what should Theme.co fix exactly? As I'm a participant in their beta-testing program, I might be able to draw some attention to it, but I do need to know what's wrong with their code to do so.
I figured out the work-around, but hoped for a better solution. Let's see if we can achieve that in collaboration with theme.co!

Your concern if you got to the root of the issue
You're response makes very much sense and that's reassuring, thanks for pointing that out!

The content of the accordion issue
I've made the suggested changes. Are the going to be included in an upcoming release as well?
I've discovered something here. When adding a new accordion-item there's an option for an 'element' or 'html' item. The first option, which is preferable for user of this theme since it gives a lot of flexibility, isn't working. However, the second on actually is.
I think this is something worth looking into: the new native 'element' accordion item will be used a lot more often, but clearly needs some work on WPML's end to function as it should.
The workaround is obvious tough: i've rebuild everything using the old 'html' items. That's okay for a couple of weeks, but I hope we can have a final solution supporting the 'element' accordion-items as well.

September 9, 2024 at 7:53 am #16154247

Itamar
Supporter

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

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

Hi,

The subheadline issue

I agree that the suggested workaround is not optimal.

I could retrieve the following information about this problem from our internal records.

This issue will appear in every widget using the subheadline. The problem is related to the cs_element_headline shortcode. If we register the cs_content_seoshortcode, we get the content available for translation with the \n\n. However, we'll still have the already available fields duplicated, and we will affect other shortcodes, such as cs_element_button, which are correctly working. Cornerstone handles all this information on the _cornerstone_data. Therefore, they need to fix it on their side. This issue has been reported to the Themeco developers. They are responsible for fixing this, as we can not fix it only from our side.

The content of the accordion issue

I've passed on your question and findings to our second-tier supporter and will let you know his reply when I have it.

Thanks,
Itamar.