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: Asia/Jerusalem (GMT+03:00)

Tagged: ,

This topic contains 22 replies, has 2 voices.

Last updated by Itamar 4 days, 8 hours ago.

Assisted by: Itamar.

Author Posts
June 18, 2024 at 8:05 am #15747762

ditteK

Background of the issue:
I am trying to import images to some ACF fields on my products using All Import. This is the second time I tried it, and the first time I got a technical issue mail from WordPress about 'Advanced Custom Fields Multilingual' which contained a link to what I was doing. But you won’t be able to access it from outside. hidden link

Symptoms:
I get an error saying it is one of your plugins. Instead of my products getting updated like normally, I got: Learn more about troubleshooting WordPress.","data":{"status":500,"error":{"type":1,"message":"Uncaught TypeError: Argument 1 passed to WPML_ACF_Post_Ids::{closure}() must be of the type string, null given in /var/www/jumbo.as/public_html/wp-content/plugins/acfml/classes/class-wpml-acf-post-ids.php:44
Stack trace:
#0 [internal function]: WPML_ACF_Post_Ids->{closure}(NULL)
#1 /var/www/jumbo.as/public_html/wp-content/plugins/acfml/classes/class-wpml-acf-post-ids.php(46): array_map(Object(Closure), Array)
#2 /var/www/jumbo.as/public_html/wp-content/plugins/acfml/classes/class-wpml-acf-post-ids.php(28): WPML_ACF_Post_Ids->convertStringOrArrayOfStringsLayer(Array, Object(WPML_ACF_Gallery_Field))
#3 /var/www/jumbo.as/public_html/wp-content/plugins/acfml/classes/class-wpml-acf-post-ids.php(13): WPML_ACF_Post_Ids->convertSerializationLayer(Object(WPML_ACF_Gallery_Field))
#4 /var/www/jumbo.as/public_html/wp-content/plugins/acfml/classes/class-wpml-acf-field.php(36): WPML_ACF_Post_Ids->convert(Object(WPML_ACF_Gallery_Field))
#5 /var/www/jumbo.as/public_html/wp-content/plugins/acfml/classes/class-wpml-acf-gallery","file":"/var/www/jumbo.as/public_html/wp-content/plugins/acfml/classes/class-wpml-acf-post-ids.php","line":44}},"additional_errors":[]}

Questions:
Why am I getting an error when importing images to ACF fields using All Import?
How can I resolve the 'Uncaught TypeError' related to WPML_ACF_Post_Ids?

June 18, 2024 at 8:20 am #15747802

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Please reply to this ticket if you need further help with this issue.

Regards,
Itamar.

June 18, 2024 at 8:36 am #15747857

ditteK

It made no difference.

June 18, 2024 at 9:05 am #15747988

ditteK

I seems I should be getting some kind of option for importing to languages inside wpallimport, but I get nothing.

June 19, 2024 at 4:10 am #15752219

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

As mentioned, our bridge plugin is required when working with WPML and WP All Import. You can use our new plugin, WPML Export and Import.

https://wpml.org/documentation/related-projects/wpml-export-and-import/

Or our legacy plugin WPML All Import.

https://wpml.org/documentation/related-projects/legacy-wpml-all-import/

If you follow our guides, you should see the language options. But I understand that you don't see.

I'm consulting our second-tier supporters about the error message you got. But it would also be good if you could share a video of the process you are taking that results in the fatal error. You can use the free online screencast service Loom - hidden link. This should help me see if you do anything wrong.

Thanks,
Itamar.

June 20, 2024 at 7:57 am #15761964

ditteK

Ok, I have been tinkering with this for a while. I am currently testing plugins in a local testsite. These are my findings:

It seems: "Advanced Custom Fields Multilingual" is causing the error, as I also got an error email about that plugin.
Everything seems to work when I disable it, even importing through postID to a language specific product, (which is how I usually import stuff)
It just plainly won't import ANYTHING, language specific or not, when it is turned on. I don't know if I need to delete it and configure it again, but I will try that. Meanwhile maybe you know some known issues with that plugin? I assume you guys made it?

Your bridge plugin seems weirdly complicated, but I might look into it at a later date. The funny thing is that it is definitely not necessary when you import through post ID to update products. I will have to look into it later though to import. It would be a lot simpler to just have a unique number and let it figure out through that which product it should pair itself with... I would suggest a functionality within wpallimport to choose the current import language and then just a box to input the unique string. And then disable all that parent import stuff from the legacy plugin, then it would be very functional. Though I understand the new one might be easier for your guys to maintain as it works across a wide mix of import plugins. You should include in your documentation where to input the extra fields because import plugins like wpallimport rely on the user to pick the things from the import that is to be imported and that whole process is extremely unclear. Do you have a video to point me to?

June 20, 2024 at 5:41 pm #15765904

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

If the import works for your purpose without our bridge plugin Advanced Custom Fields Multilingual, then please proceed without it.

We have a few known issues with the Advanced Custom Fields (ACF) plugin. You can see them here - https://wpml.org/known-issues/. Please filter by Advanced Custom Fields (ACF) and Open status.

I asked our second-tier supporter about the error you got. This is his reply.

The error tells me that there is probably a post ID kept in a meta key, and the post ID may not exist - hence, it returns a null. Perhaps you should first check the ghost cleanup troubleshooting action.

So, if you want to continue using Advanced Custom Fields Multilingual when importing the content, please proceed with the following.

1. Take a backup of the DB of your site.

2. Go to WPML -> Support -> Troubleshooting (link)

3. Once on the troubleshooting screen, press the following buttons and check if it helps.

- 'Remove ghost entries from the translation tables'

*** Please backup your database before using this.***

Regards,
Itamar.

June 24, 2024 at 2:01 pm #15807885

ditteK

Unfortunately it did not seem to do anything. Advanced Custom Fields Multilingual still does something to it. I can safely import when it is disabled tho.

I have tried on a local copy of the site where I have tried your suggestion with the ghost thing, but nothing happened in terms of import fucntionality. I then thought I might be able to control the Custom Fields Translation form inside WPML so I changed all the translation functions inside ACF to the "Same fields across languages" option.
I kinda hoped I would then be able to decide the translations function from WPML > Settings > "Custom Fields Translation". Though even though it has updated most of the posts to handle the new way to translate it (The process takes forever), all the fields that was set to "copy" in the expert mode inside ACF are locked and I cannot open them. Pressing the lock just sends me to the ACF menu.

Screenshot 2024-06-24 160002.png
June 24, 2024 at 3:07 pm #15808685

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

You wrote: "I can safely import when it is disabled tho."

Is this a good option for you to continue with?

I mean, can you deactivate Advanced Custom Fields Multilingual while using WP All Import not to get the error, and activate it when you finish the import?

Or do you want us to continue to investigate this case?

Regards,
Itamar.

June 25, 2024 at 5:55 am #15816288

ditteK

I am fine with not using it, that is a fair solution, but I would like to be able to control what to copy, as I described yesterday, from within WPML in Custom Fields Translation if that is possible. I would very much prefer that, because it is a bit of a hassle to import stuff I just want to have it copied to the other language since it would be the same.

That - or that the plugin worked, and made no errors.

June 25, 2024 at 12:34 pm #15820690

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

So, according to what you wrote yesterday, the problem you are asking for help with is not the import and the fatal error you get but the custom field settings.

You wrote: "I then thought I might be able to control the Custom Fields Translation form inside WPML so I changed all the translation functions inside ACF to the "Same fields across languages" option. I kinda hoped I would then be able to decide the translations function from WPML > Settings > "Custom Fields Translation". Though even though it has updated most of the posts to handle the new way to translate it (The process takes forever), all the fields that was set to "copy" in the expert mode inside ACF are locked and I cannot open them. Pressing the lock just sends me to the ACF menu."

On the contrary, using the "Expert" mode and not the "Same fields across languages" option enables the control of every translation option of the custom fields. It might be that the custom field settings are incorrect, which will result in an unexpected outcome for you. When the "Same fields across languages" option is selected, it is expected not to be able to change the lock icon on the field and be redirected to the ACF group.

If you have not done so yet, please review our ACFML guide using the Expert mode.

https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/expert-translation-option/

https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/

Hand in hand with the above guide goes our Custom Fields Translation Preferences for ACF and WPML guide. Please see it here.

https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/

You also wrote: "...I would very much prefer that, because it is a bit of a hassle to import stuff I just want to have it copied to the other language since it would be the same."

Are you importing to the default language or the other languages?

Please note that you cannot import stuff to the other languages to update them without first importing the stuff to the default language.

Can you please describe the import process you're taking?

Regards,
Itamar.

June 26, 2024 at 7:10 am #15830459

ditteK

"So, according to what you wrote yesterday, the problem you are asking for help with is not the import and the fatal error you get but the custom field settings."

What? I asked about having that functionality in another place, since the plugin that decides that for the ACF-fields, is the one that keeps crashing everything. So since your suggestion is to just temporarily disable it (which is not ideal for me to do every time), so I was trying to ask if we could find a different solution where we deleted "Advanced Custom Fields Multilingual" altogether and handled it inside the settings in WPML (I did not know whether that would be possible...

And yes, I did tell you that I changed away from "expert mode", however that was because I thought that might allow me to change those settings for copy and such inside the WPML settings, as I wrote:

"Translation form inside WPML so I changed all the translation functions inside ACF to the "Same fields across languages" option.
I kinda hoped I would then be able to decide the translations function from WPML > Settings > "Custom Fields Translation"."

I am genuinely asking for help here, and I am sorry, but it is a little hard when you don't carefully read through all, that I write. However, I can understand our time difference can be an issue with remembering where we are in the process and you take a (for me) whole day to respond.

I am going to trial and error me out of this mess, as this has been my best path forward, alternatively I will handle the translation is a different way. Thanks for your time and for leading me onto that bridge plugin tho. I will have to look into that. Have a good day.

June 26, 2024 at 7:42 am #15830802

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I'm sorry, but this is what you think about my support, and I am sorry for any inconvenience caused. Please understand that WP All Import and ACF issues can sometimes be hard to tackle and debug. This is true, especially if the problem combines those two plugins. The emphasis of my last reply was at its end:

Are you importing to the default language or the other languages?

Please note that you cannot import stuff to the other languages to update them without first importing the stuff to the default language.

Can you please describe the import process you're taking?

Also, it would be great if you could take a video of the import process. You can use the free online screencast service Loom - hidden link. This should help me see if you did anything wrong.

If you want further help from me, allow me to access your site and take a copy of it. For this, I need your permission to install a plugin like Duplicator or All In One Migration. I also need an exact explanation of how to replicate the problem, which means the steps I should take to see the fatal error. I'll then escalate it to our second-tier supporter.

Otherwise, please feel free to close this ticket again.

If you need further help with this, please share the access details to your site with me.
I'm enabling a private message for the following reply.

Privacy and Security Policy
We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/
**IMPORTANT**
- - Please backup the site files and database before providing us access. --
-- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.--

Regards,
Itamar.

June 26, 2024 at 8:32 am #15831202

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, and thanks for the access details and the video.

I can't access your site. I get a screen by Wordfance. Please see the attached screenshot.

Can you please correct this?

If needed you can edit the previous private message.

Regards,
Itamar.

2024-06-26_11-29-39.jpg
June 26, 2024 at 9:03 am #15831605

ditteK

I dunno if you get an update when I edit a post, but I have edited the previous message