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

Last updated by oscarM-16 1 month ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
September 4, 2019 at 6:51 am

oscarM-16

I need to find an string from evolution theme to translate

Is there any documentation that you are following?

Is there a similar example that we can see?

I got help via chat yesterday, but, I cannot find this chat now :(.

Your colleague got the strings to translate for me from admin strings, but I set the translated text for them and they does not work.

What is the link to your site?

hidden link

September 4, 2019 at 8:35 am
September 4, 2019 at 6:16 pm #4513445

Itamar
Supporter

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

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

Hi,

On the sandbox site, I could not replicate the problem. The 'Quote Text and 'Recent Work Section description strings are showing in the String Translation section without the need to do anything. And when I translate them the translation shows on the front-end. Please see the attached screenshots. You can also check this link to the test site.
hidden link

You are using a child theme for the Evolution theme.
Could you please check if the persists when switching to the parent theme?

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

Thanks,
Itamar.

September 5, 2019 at 6:49 am #4515753

oscarM-16

Yes, I disabled child theme and the problem persists...

I have also tried in our sandbox subsite in the multisite, and it works ok. Also activated the same plugins, and still working. I have no clue about what is happening. If the problem is not in parent / child theme nor plugins, maybe it is a database issue? Or it is related with some content?

Also tried in production site (not sandbox) to deactivate all but WPML plugins. So we cannot solve the problem nor replicate it in a sandbox... ?¿?¿

I also have removed and reinstalled all WPML stuff, and the issue persist.

Thanks a lot for your help.

September 5, 2019 at 7:11 am #4516011

oscarM-16

I have perform some test that I expect to be useful for you.

Sandbox site has id=3 in multisite, whereas production site has id=7.

So I performed the following sql queries in sandbox site:

select * from wp_3_icl_strings where context like '%quote%';

This gave me the id of the issued string: 41. Then executed:

select * from wp_3_icl_string_pages where string_id = 41;

And got that this string is related with pages with id=4 and id=6 in database. Finally:

select * from wp_3_icl_string_urls where id=4 or id=6

And got that this ids are related to '/wp-admin/themes.php?page=core_functions.php' and 'ajax-request'.

Then I made the same for production site (id=7)

select * from wp_7_icl_strings where context like '%quote%';

Which gaves me id=30554 for the issued string. Then I made:

select * from wp_7_icl_string_pages where string_id = 30554

The query returned no result, so the affected string is not related to any page in database.

I don't know exactly what this means, cause I could not find any description of WPML database tables further than icl_strings and icl_string_translations, but hope this help you to find the problem.

September 5, 2019 at 1:41 pm #4519655

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Itamar is not available today, so I am taking care of this ticket, hope that's ok. 🙂

Thank you for the detailed information, I would need few info from your side so could you please provide feedback on the following?

#1
Did you check the sandbox site which Itamar created? Do you find any difference in the site and site where the issue is happening?

#2
Can you just delete the strings from WPML->String Translation once and re-translate it? Sometimes this helps to solve this type of issue.

#3
Also, what is your string language and check if the string registered is default language, can you change the language of the string once and translate it to see if that helps?
https://wpml.org/documentation/getting-started-guide/string-translation/#original-language-of-strings

Look forward to your reply.

Thanks

September 5, 2019 at 3:17 pm #4520431

oscarM-16

#1
I checked the site and added divi-builder plugin, I can recheck. I also created another sandbox site in my server and also cannot replicate the problem. The only difference I found is what I mentioned about some differences in database. I cannot check this in sandbox site since I have not access to database.

#2
Already done, no results, sorry.

#3
I have just tried this, with no result.

What do you think about escaping the code in which the parameter is displayed, so it will appear as string in the domain I chose, and try to translate in this way? Maybe it is a good workaround.

Is there a way to force WPML to delete and regenerate all strings (emtpying or even deleting all the tables related to strings in the database)? My best hypothesis, for the moment, is that something was wrong when the database structure was created.

Thanks a lot for your help.

September 6, 2019 at 2:53 am #4522877

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello Oscar,

Thank you for the detailed information.

Since this is a theme option strings, the workaround you suggested will not work.

I updated the string from the theme option and noticed that it wasn't updated properly on the string translation so I followed the below steps:

- Went to WPML->Settings->Custom XML configuration and added the following code

<wpml-config>
	<admin-texts>
		<key name="Evolution_quote_one"/>
		<key name="Evolution_homework_desc"/>
	</admin-texts>
</wpml-config>

- Went to WPML->Settings->Multilingual content setup and refreshed the page
- Went to WPML->String Translation and noticed that the string changes are updated correct now

Further, I translated those strings and they were still not working.

So it looks like either conflicts or php errors are blocking this string from display so could you please perform the below steps and share me the results?

#1
Can you confirm that you are still experiencing issues with minimal set up (all plugins except WPML disabled and the theme on a WordPress default such as Twenty Nineteen)

#2
Debugging

1. Please follow the debugging information provided here: http://wpml.org/documentation/support/debugging-wpml/ .
2. Repeat the action of creating the problem.
3. Copy and paste the contents of debug.log (log file inside the /wp-content/ directory) here for me to see.

Also, the ftp details is not working, could you please check it once?

Look forward to your reply.

Thanks

September 6, 2019 at 6:56 am #4523517

oscarM-16

#1 How can I reproduce the problem in Twenty XXXXX theme, since the error is with an string that is specific from evolution theme?

#2 Debug information added

September 6, 2019 at 7:15 am #4523573

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I am sorry for that, just disable all non-wpml plugins and check if the issue exists.

I was asking for debug.log that's located in wp-content folder, it normally consists of php errors log, so can you check if there is any such files?

Look forward to your reply.

Thanks

September 10, 2019 at 6:37 am #4542203

oscarM-16

Hi!

I finally found the problem (but no idea about how was it provoked).

The admin string was created in my live site as "Evolution_quote_one", and in my sandbox as "evolution_quote_one". Thats the only difference between live and sandbox sites I have found.

If I edit home.php file, where quote is displayed, I find:

$quote_one = get_option('evolution_quote_one')

Changing this to

$quote_one = get_option('Evolution_quote_one')

(uppercasing first E, I mean)

did the work, and now it works!

I have no idea about why the string was created in such way (with the first letter uppercased).

As I already had a child theme with a custom version of home.php, it is not a problem to change this in this file.

Maybe you are interested in finding out why this string was created with the first letter uppercased, whereas in every working site it was created lowercased. My issue is resolved (at least workarounded), but feel free of asking me about more test that could help to find the origin of the issue.

Thanks a lot for your help, I appreciate it a lot, considering that this has been a quite hard to solve issue.

September 10, 2019 at 8:50 am #4543299

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Glad to know you found the solution, since it's not happening at the sandbox site, I am not sure how it happened at your live site, probably during update the option name got changed. Since I can't reproduce it, I think we can close here.

Thanks

September 12, 2019 at 8:44 am #4559419

oscarM-16

My issue is resolved now. Thank you!