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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-08:00)

This topic contains 16 replies, has 4 voices.

Last updated by Bobby 1 year, 9 months ago.

Assisted by: Bobby.

Author Posts
April 4, 2023 at 12:58 pm #13400013

jose-ramonE

Hi

We found a bug 11 months ago with media duplication and not deleted properly with WPML All import. The ticket issued to cover the situation is: WPML All Import does not remove old media when overriding the images on import

I just need to know if that is still the appropriate solution for the problem or the bug is finally fixed in latest releases.

We have been having a weird error when running the import process and i suspect the solution is no longer working:

WPML_Media_Attachments_Duplication
[Fri Mar 10 08:48:14.270798 2023] [proxy_fcgi:error] [pid 20664:tid 140355804518144] [client 89.46.89.142:55744] AH01071: Got error 'e error Column 'translation_id' cannot be null for query INSERT INTO `j6J2dIQ_icl_translation_status` (`status`, `translation_id`) VALUES ('9', NULL) made by require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, pmxi_wp_loaded_99, Wpai\\Scheduling\\Import->process, PMXI_Import_Record->execute, PMXI_Import_Record->process, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_Media_Attachments_Duplication->save_post_actions, WPML_Media_Attachments_Duplication->sync_attachments, WPML_Media_Attachments_Duplication->duplicate_post_attachments, WPML_Media_Attachments_Duplication->create_duplicate_attachment, WPML_Model_Attachments->duplicate_attachment, WPML_Model_Attachments->add_language_information_to_attachment, WPML_Post_Status->set_statusPHP message: WordPress database error Column 'translation_id' cannot be null for query INSERT INTO `j6J2dIQ_icl_translation_status` (`status`, `translation_id`) VALUES ('9', NULL) made by require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, pmxi_wp_loaded_99, Wpai\\Scheduling\\Import->process, PMXI_Import_Record->execute, PMXI_Import_Record->process, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_Media_Attachments_Duplication->save_post_actions, WPML_Media_Attachments_Duplication->sync_attachments, WPML_Media_Attachments_Duplication->duplicate_post_attachments, WPML_Media_Attachments_Duplication->create_duplicate_attachment, WPML_Model_Attachments->duplicate_attachment, WPML_Model_Attachments->add_language_information_to_attachment, WPML_Post_Status->set_statusPHP message: WordPress database error Column 'translation_id' cannot be null for query INSERT INTO `j6J2dIQ_icl_translation_status` (`status`, `translation_id`) VALUES ('9', NULL) made by require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, pmxi_wp_loaded_99, Wpai\\Scheduling\\Import->process, PMXI_Import_Record->execute, PMXI_Import_Record->process, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_Media_Attachments_Duplication->save_post_actions, WPML_Media_Attachments_Duplication->sync_attachments, WPML_Media_Attachments_Duplication->duplicate_post_attachments, WPML_Media_Attachments_Duplication->create_duplicate_attachment, WPML_Model_Attachments->duplicate_attachment, WPML_Model_Attachments->add_language_information_to_attachment, WPML_Post_Status->set_statusPHP message: WordPress database error Column 'translation_id' cannot be null for query INSERT INTO `j6J2dIQ_icl_translation_status` (`status`, `translation_id`) VALUES ('9', NULL) made by require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, pmxi_wp_loaded_99, Wpai\\Scheduling\\Import->process, PMXI_Import_Record->execute, PMXI_Import_Record->process, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_Media_Attachments_Duplication->save_post_actions, WPML_Media_Attachments_Duplication->sync_attachments, WPML_Media_Attachments_Duplication->duplicate_post_attachments, WPML_Media_Attachments_Duplication->create_duplicate_attachment, WPML_Model_Attachments->duplicate_attachment, WPML_Model_Attachments->add_language_information_to_attachment, WPML_Post_Status->set_statusPHP message: WordPress database error Column 'translation_id' cannot be null for query INSERT INTO `j6J2dIQ_icl_translation_status` (`status`, `translation_id`) VALUES ('9', NULL) made by require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, pmxi_wp_loaded_99, Wpai\\Scheduling\\Import->process, PMXI_Import_Record->execute, PMXI_Import_Record->process, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_Media_Attachments_Duplication->save_post_actions, WPML_Media_Attachments_Duplication->sync_attachments, WPML_Media_Attachments_Duplication->duplicate_post_attachments, WPML_Media_Attachments_Duplication->create_duplicate_attachment, WPML_Model_Attachments->duplicate_attachment, WPML_Model_Attachments->add_language_information_to_attachment, WPML_Post_Status->set_statusPHP message: WordPress database error Column 'translation_id' cannot be null for query INSERT INTO `j6J2dIQ_icl_translation_status` (`status`, `translation_id`) VALUES ('9', NULL) made by require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, pmxi_wp_loaded_99, Wpai\\Scheduling\\Import->process, PMXI_Import_Record->execute, PMXI_Import_Record->process, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_Media_Attachments_Duplication->save_post_actions, WPML_Media_Attachments_Duplication->sync_attachments, WPML_Media_Attachments_Duplication->duplicate_post_attachments, WPML_Media_Attachments_Duplication->create_duplicate_attachment, WPML_Model_Attachments->duplicate_attachment, WPML_Model_Attachments->add_language_information_to_attachment, WPML_Post_Status->set_statusPHP message: WordPress database error Column 'translation_id' cannot be null for query INSERT INTO `j6J2dIQ_icl_translation_status` (`status`, `translation_id`) VALUES ('9', NULL) made by require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, pmxi_wp_loaded_99, Wpai\\Scheduling\\Import->process, PMXI_Import_Record->execute, PMXI_Import_Record->process, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_Media_Attachments_Duplication->save_post_actions, WPML_Media_Attachments_Duplication->sync_attachments, WPML_Media_Attachments_Duplication->duplicate_post_attachments, WPML_Media_Attachments_Duplication->create_duplicate_attachment, WPML_Model_Attachments->duplicate_attachment, WPML_Model_Attachments->add_language_information_to_attachment, WPML_Post_Status->set_statusPHP message: WordPress database error Column 'translation_id' cannot be null for query INSERT INTO `j6J2dIQ_icl_translation_status` (`status`, `translation_id`) VALUES ('9', NULL) made by require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, pmxi_wp_loaded_99, Wpai\\Scheduling\\Import->process, PMXI_Import_Record->execute, PMXI_Import_Record->process, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_Media_Attachments_Duplication->save_post_actions, WPML_Media_Attachments_Duplication->sync_attachments, WPML_Media_Attachments_Duplication->duplicate_post_attachments, WPML_Media_Attachments_Duplication->create_duplicate_attachment, WPML_Model_Attachments->duplicate_attachment, WPML_Model_Attachments->add_language_information_to_attachment, WPML_Post_Status->set_statusPHP message: WordPress database error Column 'translation_id' cannot be null for query INSERT INTO `j6J2dIQ_icl_translation_status` (`status`, `translation_id`) VALUES ('9', NULL) made by require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, pmxi_wp_loaded_99, Wpai\\Scheduling\\Import->process, PMXI_Import_Record->execute, PMXI_Import_Record->process, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_Media_Attachments_Duplication->save_post_actions, WPML_Media_Attachments_Duplication->sync_attachments, WPML_Media_Attachments_Duplication->duplicate_post_attachments, WPML_Media_Attachments_Duplication->create_duplicate_attachment, WPML_Model_Attachments->duplicate_attachment, WPML_Model_Attachments->add_language_information_to_attachment, WPML_Post_Status->set_statusPHP message: WordPress database error Column 'translation_id' cannot be null for query INSERT INTO `j6J2dIQ_icl_translation_status` (`status`, `translation_id`) VALUES ('9', NULL) made by require_once('w

April 4, 2023 at 5:01 pm #13402809

jose-ramonE

i dont think that the custom code you gave me is the issue. i changed the file back to its original content and the issue persists. this is a very important issue since i cannot run my importation process and thus my products are displaying no images. i have tried importing a single product too with only text fields with the same result. This seems to be the main error that is blocking the importation:

Column 'translation_id' cannot be null for query INSERT INTO `j6J2dIQ_icl_translation_status` (`status`, `translation_id`) VALUES ('9', NULL)

April 4, 2023 at 5:03 pm #13402859

jose-ramonE

also please consider all my WPML plugins are updated and i also updated wordpress to 6.2 (all all import is also in the latest version)

April 6, 2023 at 11:28 pm #13423721

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi there,

Thank you for contacting WPML support!

I understand you're experiencing an issue importing WooCommerce products using WP All Import and WPML All Import extension. The problem is happening with and without the fix provided in this ticket: https://wpml.org/forums/topic/wpml-all-import-does-not-remove-old-media-when-overriding-the-images-on-import/.

From the shared error log, I see this error:

Got error 'e error Column 'translation_id' cannot be null for query INSERT INTO `j6J2dIQ_icl_translation_status` (`status`, `translation_id`) VALUES ('9', NULL)

I also understand that you're using the latest versions of the plugin, but we want to take a look at the debug information, and they can help us know better about your installation.

Please provide me with information about your environment by following these steps: http://wpml.org/faq/provide-debug-information-faster-support/.

Looking forward to hearing back from you.

April 6, 2023 at 11:53 pm #13423731

jose-ramonE

Hello, thank you for answering. I just added the debug information.
Looking forward to hearing from you. Thank you!

April 7, 2023 at 3:10 pm #13428115

Andreas

Thank you very much for your details. It seems that the workaround is not working anymore.

May I ask you to check our errata here :

https://wpml.org/errata/wpml-all-import-images-are-not-deleted-from-the-upload-folder-when-updating-posts/

Regards,
Andreas

April 7, 2023 at 3:24 pm #13428215

jose-ramonE

Hi,

The problem is far more severe than the workaround not working: i cannot run any importation process.

This is causing my website to not display the correct information. When running the importation (with or without the setting for updating images) the process gets stuck and i am not even able to import 1 single product. the concrete error that seems to be causing this is:

Got error 'e error Column 'translation_id' cannot be null for query INSERT INTO `j6J2dIQ_icl_translation_status` (`status`, `translation_id`) VALUES ('9', NULL)

As already pointed out by Ahmed.

At this point i do not care about the images getting duplicated in the import process but the fact i cannot run any import process whatsoever. I need to please be able to run the import, even if the images get duplicated

Regards,

April 7, 2023 at 4:09 pm #13428333

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

April 10, 2023 at 5:53 pm #13439205

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Go to wp_icl_translation_status Database table and review it's structure.

Verify that translation_id is set to NO for NULL.

The error you are getting is because the query is returning NULL for the ID.

Otherwise, do I have your permission to install the plugin phpmyadmin to review your database

I have attempted to reproduce this behavior (the fatal error you are getting on the import) on a staging site and could not.

Please use the following sandbox environment, upload your XML and Import settings and let me know your results.

hidden link

phpmyadmin

Screen Shot 2023-04-10 at 10.50.10 AM.png
April 10, 2023 at 5:58 pm #13439311

jose-ramonE

Hi Bobby,

Yes, you have my ok to install the plugin you mention to check. Thanks for asking!

Please let me know if you find anything!

Thank you

April 10, 2023 at 7:08 pm #13439701

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you, I reviewed the database and it looks OK.

If possible, please use the sandbox environment I created and let me know if you can reproduce this error.

April 11, 2023 at 8:15 am #13442671

jose-ramonE

Hi Bobby, I am trying to upload the XML and all the configuration to the testing environment you provided but i am getting a problem with the pro version of the plugin, could you please install it?

"Upgrade to the Pro edition of WP All Import to use the Function Editor.
If you already own it, remove the free edition and install the Pro edition."

In any case, the issue with the null value in the translation_id, I think is related to a new instance that is trying to be recorded in the database, not that we are quering a value that is null. Checking the database table i do not see any null values for the said column. I think that the import is trying to create a new instance with a null value for translation_id and given the not null restriction the error is being raised. What do you think?

April 11, 2023 at 6:55 pm #13449529

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Please try again I have activated the PRO version on the sandbox.

"I think that the import is trying to create a new instance with a null value for translation_id and given the not null restriction the error is being raised. What do you think?"

Yes, I believe that is what is happening. Are you using any custom function/code that would attempt to create a NULL entry to the database during the import?

The reason of testing this on a clean environment is to determine if something is causing this behavior in the import itself meaning that it's import XML fille specific or if it happens due to a bug.

April 11, 2023 at 7:32 pm #13449745

jose-ramonE

Hi Bobby. Thank you

I also need the The WooCommerce Add-On is Required to Import Products please
I also use the ACF extension for WPML
could you please install these?

Thank you

April 12, 2023 at 10:33 am #13454451

jose-ramonE

Hi again,

I was able to install the plugins on my end and ran the process using the same XML and configuration files. It ran ok in the test environment.

How can we then fix it in the production site?

Thank you

The topic ‘[Closed] is the temporary solution offered for my ticket is ok?’ is closed to new replies.