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

Last updated by Dat Hoang 2 years, 11 months ago.

Assigned support staff: Dat Hoang.

Author Posts
October 5, 2016 at 2:07 pm #1109045

The J

Every time I update WPML, the Theme & Plugin Translation option (translate through String Translate or with .po file) gets reset to "DONT use String Translation".

Usually when I deactivate WPML and flush its cache it makes me save the first option again, but this time it won't save... every time I save, when the page loads again, it's stuck on the "DONT use String Translation" option.

This is getting really annoying.

Fix please?

October 5, 2016 at 2:34 pm #1109088

The J

It appears that to save an option, you need more than 100MB of RAM....

When sending the request, I see that the response (before the page reloads) is often:

Fatal error: Out of memory (allocated 100401152) (tried to allocate 88 bytes) in /wp-includes/wp-db.php on line 1832

I only get this issue with WPML, and the server definitely has more than 100MB free.
Also, I have this in the wp-config:

define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

I think you should reconsider how you save this option, because I manage dozens of websites and this always happen (even when the site loads fine and never has memory issues)... and it's REALLY frustrating.

October 5, 2016 at 2:51 pm #1109111

The J

Here is the php_info() if you need to check the current setup hidden link

October 6, 2016 at 7:39 am #1109561

Dat Hoang
Every time I update WPML, the Theme & Plugin Translation option (translate through String Translate or with .po file) gets reset to "DONT use String Translation".

This looks like an issue with WPML. I'm checking this.

Fatal error: Out of memory (allocated 100401152) (tried to allocate 88 bytes) in /wp-includes/wp-db.php on line 1832

You're right. It's asking 100MB only. Please let me know how many strings you have in WPML -> String Translation? What kind of hosting do you use? Shared hosting, VPS or anything else?

October 7, 2016 at 9:06 am #1110566

The J

I can give you access to the site and you can check what you need.

It's this hosting hidden link, which I use for many other sites (with WPML). They have a 400MB ram limit... so plenty resources.
I have had this issue with WPML on many others sites, the issue with not being able to save the option "Use String Transalte" is very common unfortunately (on different hosting / different sites).

It shouldn't matter how many strings there are, clearly something isn't planned well in WPML, when saving, since you can never know if the site will have 10 or 10.000 strings. It should work regardless.

Waiting for support on this urgently.

October 8, 2016 at 6:51 am #1111174

Dat Hoang

I agree on this:
"It shouldn't matter how many strings there are, clearly something isn't planned well in WPML, when saving, since you can never know if the site will have 10 or 10.000 strings. It should work regardless."

We're trying to have the info to troubleshoot the issue. I do not imply that your site can not have 10.000 strings. Hope that does make sense.

I need to request temporary access (wp-admin and FTP) to your site in order to be of better help. You will find the needed fields for this below the comment area when you log in to leave your next reply. hidden link

This info is private and available to you and supporters only. Read more about this: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Note that:
+ Backup (both files and database) your site before giving us your credentials
+ It would be better if you give me the test site rather than the live site.

We'd like to request the permission to disable, enable and install themes and plugins for this site. Please accept this?
---

The issue "Don't use String Translation to translate the theme and plugin" is quite common. We fixed it in the past but it looks like it's coming back.
I'm still checking with our team.

October 10, 2016 at 2:42 pm #1112160

The J

I think you forgot to enable the private answer (dont see the fields for FTP info and all that).

October 11, 2016 at 1:09 am #1112446

Dat Hoang

I'm sorry. Can you please check again?

----

We reported the issue losing the theme localization to our developers. In this ticket, I continue to check the issue

Fatal error: Out of memory (allocated 100401152) (tried to allocate 88 bytes) in /wp-includes/wp-db.php on line 1832
October 11, 2016 at 8:27 pm #1113243

anthonyC-8

I'm also having the similar issue on a site I just started working on using the latest version of string translation. I'm not getting any memory errors, however every time I check translate the themes using string translation and hit save it reverts back to Don't Use string translation. Is this an issue with the newest version?

October 14, 2016 at 7:37 am #1115309

Dat Hoang

@jany: Thanks for your info.

I can log-in your site.
#1,
Your site has 32474 strings. I am not sure why it has too many strings like this.
This might be the issue, and we need to run more tests.
Can you please try to disable the option "Attiva invio automatico delle stringhe in traduzione"?
Does that help?

#2,
I see that you have many database backup versions at wp-admin/admin.php?page=wp-dbmanager%2Fdatabase-manage.php . Is that fine for me get one of them?

Moreover, please zip your files excluding all other contents except:
- core files
- wp-content/themes
- wp-content/plugins

then give me the location to download it on your FTP?
I need to grab it and troubleshoot more.

October 14, 2016 at 1:05 pm #1115624

The J

I dont know why it has so many strings. I dont need 99% of them. All I need to translate is stuff from the cookie notice plugin, the theme and theme child frontend. The rest is useless to me.

I changed the auto-register strings option, so it only gives me the strings I need.
How do I remove all the other strings already registered there? Can you do it? I dont need them, so they are just taking up useless space/resources.

I have about 30 backups, I know, it doesnt make any difference to you or the site, not something you should worry about 🙂

You will find 2 zip files in html/debug folder on FTP. One is the db and one is the whole site.

Keep me updated please, the matter is pretty urgent. Thanks!

October 17, 2016 at 7:30 am #1116465

Dat Hoang

Thanks for your info.

Actually when saving this option back to "Translate the theme and plugins using WPML's String Translation", we are running some other tasks and it causes the issue related to the memory.

So far, you can use this snippet to change this setting.

$wpml_options = get_option( 'icl_sitepress_settings' );

// change to "Translate the theme and plugins using WPML's String Translation" - value = 1
// change to " Don't use String Translation to translate the theme and plugins" - value = 2
$wpml_options['theme_localization_type'] = 1; 

update_option( 'icl_sitepress_settings', $wpml_options );

I'm reporting this to our 2nd tier supporters and we need to troubleshoot more about this.

----

@anthonyc-8: Yes, it's a known issue. Our developers were aware of it. We will work on that later.

October 17, 2016 at 7:45 am #1116484

The J

You should either defer the other tasks to after the save or run them in sequential order through Ajax, rather than all in one go.

Unfortunately, setting the option manually to 1, causes this:

Fatal error: Out of memory (allocated 239075328) (tried to allocate 105 bytes) in /wp-content/plugins/wpml-string-translation/classes/filters/db-cache/class-wpml-st-db-translation-retrieve.php on line 170

which is probably where the original problem originates from anyway.

At line 170 you are running

parse_result

on each string found in the db table...... no wonder why it's running out of memory.....

foreach ( $rowset as $row_data ) {
      $this->parse_result( $row_data, $context );
}

Why do you need this when saving / checking an option?
So you can display the list of Plugins/Themes and strings below in the same page?
I don't think that's needed really.

You could simply add an Ajax request, on button click, to display in batch mode the translated strings, per Plugin / Theme, as a separate instance.

You really need to fix this issue ASAP.... thank you.

October 17, 2016 at 10:47 am #1116681

The J

Meanwhile, what would be the best way to batch delete all registered strings, for all the plugins I dont need to translate?

Deleting them from the strings page all at once wont work (browser crashes with too many strings to delete at once).

You should add a button, in the string translation options page to delete in patch each Plugin strings' found.

Please advise.

October 18, 2016 at 1:33 am #1117311

Dat Hoang

It looks like that is the issue.

I guess you can run SQL queries? If so, please have a look at https://wpml.org/documentation/support/wpml-tables/

There we explain how we store the strings.

I'm sorry about this, our developers were aware of it, and we will troubleshoot and fix it soon.