Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem: When String Translation is active there is the following error: Uncaught InvalidArgumentException: String id cannot be empty.

Solution: The error was caused by an incorrect database migration. Migrating the database from the local test area to online caused some errors in creating the tables in the SQL database. Some tables didn't have AUTO INCREMENT on, which causes duplicate IDs errors.

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

Last updated by maartenK-6 5 years ago.

Assigned support staff: Bigul.

Author Posts
November 30, 2016 at 10:21 am #1147353

maartenK-6

I am trying to:
Use some other plugins. In this case it's the visual editor of Ninja Forms.

URL of (my) website where problem appears:
hidden link

I expected to see:
The visual editor (an overlay of the wp-admin)

Instead, I got:
A blank page. Further investigation in the source code revealed the following exception:

Fatal error: Uncaught InvalidArgumentException: String id cannot be empty in *host*/wp-content/plugins/wpml-string-translation/classes/filters/db-cache/class-wpml-st-page-translation.php on line 103

Further information:
- Deactivating String Translation makes the problem go away. But this is not an option since I have to translate strings.
- Updating to latest versions of WPML/String translation does NOT solve the problem.

I have commented the line which throws the exception. But I would like to have a more solid fix for this. I've seen several others on this forum having this issue, and it seems it isn't fixed yet.

November 30, 2016 at 12:57 pm #1147601

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/London (GMT+00:00)

Hello, thank you for contacting WPML Support!
I will take care of your ticket.

1. Have you tried the latest WPML 3.6.1 and String Translation 2.5.0?
- https://wpml.org/account/downloads/

2. Can you please enable the WordPress debug mode?

- Open the wp-config.php file and search for this line:

define('WP_DEBUG', false);

Change it to:

define('WP_DEBUG', true);

To enable the debug log please add the following line:

define( 'WP_DEBUG_LOG', true );

Now the errors will be logged in the debug.log file inside /wp-content/ folder.

The wp-config.php file is inside your WordPress root folder.

Uncomment the line which throws the exception.

Now, please post the content of wp-content/debug.log file here in the forum or on pastebin.com if it is too big.

Related documentation:
- https://wpml.org/documentation/support/debugging-wpml/
- http://codex.wordpress.org/Debugging_in_WordPress
- https://wpml.org/faq/500-error/

Thank you

December 1, 2016 at 8:45 am #1148490

maartenK-6

I'm sorry for the late comment.

We already reviewed the problem and further investigated here at the office. Also we discovered it's a problem caused by something external from WPML:

Migrating the database from the local test area to online caused some errors in creating the tables in de sql database. Some tables didn't have AUTO INCREMENT on, which throws errors saying duplicate ID's and stuff. And when data isn't structured in a good way, well.. it's going to throw more errors.

We repaired some data and did some tests, and it seems to solve the problem.

Thanks for the help anyway!