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.

This topic contains 3 replies, has 2 voices.

Last updated by Bruno Kos 1 year, 5 months ago.

Assigned support staff: Bruno Kos.

Author Posts
April 9, 2019 at 10:46 am #3565531

lauraN-2

We've tried to move the website, but as soon as we activate the string translation we get a bunch of 500 errors. I've included the error log in this message. As we simply can't have this we have now put the website back where it was. So there is no live version of the website for you to look into currently but I hope you might still be able to help out!

[Tue Apr 09 11:39:03.570051 2019] [lsapi:error] [pid 61467:tid 140454116939520] [client 84.53.83.115:50264] [host evcompany.eu] Backend fatal error: PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'String id cannot be empty' in /home/u4676p2937/domains/evcompany.eu/public_html/wp-content/plugins/wpml-string-translation/classes/filters/db-cache/class-wpml-st-page-translation.php:103\nStack trace:\n#0 /home/u4676p2937/domains/evcompany.eu/public_html/wp-content/plugins/wpml-string-translation/classes/filters/db-cache/class-wpml-st-page-translation.php(44): WPML_ST_Page_Translation->validate_values('0', 'e566fe9aef1502d...', 'MPM')\n#1 /home/u4676p2937/domains/evcompany.eu/public_html/wp-content/plugins/wpml-string-translation/classes/filters/db-cache/class-wpml-st-db-translation-retrieve.php(161): WPML_ST_Page_Translation->__construct('0', 'e566fe9aef1502d...', 'MPM', '%d nieuwe verta...', true, '')\n#2 /home/u4676p2937/domains/evcompany.eu/public_html/wp-content/plugins/wpml-string-translation/classes/filters/db-cache/class-wpml-st-db-translation-retrieve.php(139): WPML_ST_DB_Translation_Retrieve->build_translation(Array, 'e566fe9aef1502d...', 'MPM' in /home/u4676p2937/domains/evcompany.eu/public_html/wp-content/plugins/wpml-string-translation/classes/filters/db-cache/class-wpml-st-page-translation.php on line 103\n

April 9, 2019 at 11:04 am #3565827

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

It seems like that this site isn't using the latest WPML plugins - can you update these all first? E.g. WPML has the latest version of 4.2.5, String Translation v 2.10.3, etc.

However, this will not fix the issue, because this:

Backend fatal error: PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'String id cannot be empty'

Is related to the below, so please see these links on what is behind this and how to get it resolved:
https://wpml.org/forums/topic/woocommerce-wpml-unstable-php-fatal-error-uncaught-invalidargumentexcepti/#post-3248529
https://wpml.org/forums/topic/uncaught-invalidargumentexception-string-id-cannot-be-empty/#post-1148490

So in a nutshell, most likely it is due to auto-increment not being set on all the tables related to string translation (wp_icl_strings, wp_icl_string_translations...) or (see my image) you may find ID set to either 0 or blank for one or multiple strings.

Another thing:

We've tried to move the website

Did this work on the previous host? If yes, may I suggest that you perform migration anew, because since this error has occurred, there could be potentially other issues that happened during migration. I use this plugin on a daily basis and usually performs migrations without issues:
https://wordpress.org/plugins/duplicator/

Regards,
Bruno Kos

April 10, 2019 at 9:12 am #3574023

lauraN-2

Why does this have to happen manually and doesn't the plugin do this automatically?
There are multiple records with the id 0 which makes it impossible to create unique ids... Can all of these 0 records just be deleted?

April 10, 2019 at 10:04 am #3574671

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

It is hard to figure out why this happened - if this isn't the case on your original site (where it was before moving it), then most likely something has happened during migration and I am unable to give more specific information.

Can all of these 0 records just be deleted?

Yes, that would be one of ideas on how to get this resolved because ID must be unique.

Regards,
Bruno Kos

The topic ‘[Closed] 500 errors after migration’ is closed to new replies.