Skip Navigation

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

Problem:
The client's website displayed a blank page and became unusable when WPML was activated alongside Elementor. An error message indicated: 'target should be an object with map method or an array'. Further investigation revealed issues with saving changes due to a database error stating 'Argument ID must be numeric and greater than 0'.
Solution:
We identified that the issue was related to the database's _posts table missing an auto increment setting for the ID column. We recommended the client to:
1. Perform a full site backup.
2. Run the following SQL query using a tool like PHPMyAdmin:

ALTER TABLE `wp_posts` CHANGE `ID` `ID` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, add PRIMARY KEY (`ID`);

3. Check if the issue persists after applying the fix.
Additionally, we suggested checking out these articles for further database repair:

If this solution does not resolve the issue or seems irrelevant due to updates or different circumstances, we recommend opening a new support ticket. We also highly suggest checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at https://wpml.org/forums/forum/english-support/.

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.

Tagged: 

This topic contains 20 replies, has 2 voices.

Last updated by Bigul 8 months, 2 weeks ago.

Assisted by: Bigul.

Author Posts
July 30, 2024 at 12:43 pm #16020602

Bigul
Supporter

Languages: English (English )

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

Hi Thomas,

We are getting the expected results in the local copy after setting Auto Increment for the _posts table of the database. Somehow it was missing.

So please run the following query after a full site backup using a tool like PHPMyAdmin (to access your database) and make sure the issue exists or not.

ALTER TABLE `wp_posts` CHANGE `ID` `ID` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, add PRIMARY KEY (`ID`); 

--
Thanks!

Bigul

July 31, 2024 at 12:49 am #16022645

Thomas

Hi Bigul,

After this period of time, I know that there should be a problem with the database, but I don't know why this problem occurs? And, how to fix it?

Can you assist with the restoration of this database?

Or, tell me, how to repair the database?

Thank.

Thomas

July 31, 2024 at 7:39 am #16023313

Bigul
Supporter

Languages: English (English )

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

Hi Thomas,

On our local copy, it started to work as expected after running the following query. So please try it after a site backup and let us know your feedback. You can use tool like PHPMyAdmin to access the database.

ALTER TABLE `wp_posts` CHANGE `ID` `ID` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, add PRIMARY KEY (`ID`); 

You can try the steps suggested in the following articles to repair the database. But please take a full site backup{mandatory} before that.

hidden link

hidden link

Have you migrated the site recently?

--
Thanks!

Bigul

August 1, 2024 at 6:21 am #16027591
Thomas

Hi Bigul,

Thank you for your advice.

From the current operating conditions, it seems that the web page has returned to normal.

However, I found that there is a page that is difficult to translate into German. The translated content can be seen, but it cannot be generated.

Can you help understand what is going on?

In addition, I have not done any relocation of the website before this.

Thank.

Thomas

New threads created by Bigul and linked to this one are listed below:

https://wpml.org/forums/topic/there-is-a-page-that-is-difficult-to-translate-into-german/

AE33ECED-AACD-463E-990A-F8B6727CAEAD.png
6F8E9C74-11CC-400B-BF2A-37870DA833F2.png
6DA0619B-0F04-4BE2-B399-AE2788FDD4B3.png
E5116963-E8D5-44AB-A416-4E332C0BFC6A.png
August 1, 2024 at 7:00 am #16027801
Thomas

In addition, I found that the website's language switcher seemed to be out of action and could not provide the switching function properly.

Thank.

New threads created by Bigul and linked to this one are listed below:

https://wpml.org/forums/topic/language-switcher-seemed-to-be-out-of-action/

E709F74A-FAD3-426D-98BA-2AEB549F20C2.png
F55DB6A4-2BD9-4321-9D88-BE116B5622C6.png
August 1, 2024 at 4:56 pm #16030850

Bigul
Supporter

Languages: English (English )

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

Hi Thomas,

Thank you for the feedback. Please note that I have opened new tickets for the other issues. As per our support policies, we can only handle one issue per ticket. This helps us serve you better and avoids discussing multiple problems in a single ticket. I will get back to you soon on the latest tickets. Please wait. Thank you for your understanding.

--
Thanks!

Bigul