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.

Our next available supporter will start replying to tickets in about 2.08 hours from now. Thank you for your understanding.

This topic contains 12 replies, has 3 voices.

Last updated by linaD 2 months, 4 weeks ago.

Assigned support staff: Riffaz.

Author Posts
July 6, 2019 at 11:57 am #4155789

linaD

Hi guys,

I'm using Woocommerce and I've created Variation product with custom (not global) attributes. I've translated them and everything works fine on the product page. Meanwhile I get an error on the Basket page:
Invalid argument supplied for foreach() in ....../wp-content/plugins/woocommerce-multilingual/inc/class-wcml-attributes.php on line 408

I've made a quick debug and it fails here because "false" is passed into the foreach loop (see attached image)

Any ideas on this ?

I'm on the latest WooCommerce Multilingual 4.6.5 version

(Sorry for the wrong title, it's not product but Basket page)

July 7, 2019 at 12:18 pm #4157687

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Thank you for contacting WPML support.

The same issue solved by the steps provided by our 2nd tier here: https://wordpress.org/support/topic/invalid-argument-in-class-wcml-attributes-php/
Please check the steps explained there and let me know how it goes after trying it.

Regards,
Riffaz.

July 7, 2019 at 4:28 pm #4157967

linaD

Hi,

I re-saved all URLs (although I can't find custom attribute URL as mentioned in the ticket you've posted). Do you mind connecting to my site and having a look ? Maybe it's related to the fact that all my URL translations where saved as new endpoints but in wrong original language (url.png)??

July 8, 2019 at 8:59 am #4160381

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Ok, let me know your site login details to check this closely.
Also, let me know the steps to check this.

the next reply is private.

Regards,

July 12, 2019 at 8:17 am #4196277

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

Hello,
I'll answer this ticket for now because Riffaz is not available.

I checked your site and noticed that even though there was one translation manager, there wasn't any translator available, so please go to WPML > Translation Management > Translation Roles and add yourself as a translator for the required language pairs.

I also noticed however that the product you mentioned was already successfully translated, so i wonder if you managed to fix the problem before this answer?

Please try the steps i sent above, since they will probably be needed anyway if you plan to add new pages or modify the ones you already have (i.e: edit and update pages and their translations).

Regards.

July 12, 2019 at 6:30 pm #4201079

linaD

Thank you for your suggestion to add myself as a translator. Anyways, I feel that your suggestion is not related to my actual problem as I'm still having the issue described before. If you would follow the repro steps in the private message you would be able to see the error (just add that product to the basket and go to the basket page).

I know that product appears to be 100% translated but I'm still having the same error so I don't know what is the case here. See attached image and please could you try to replicate the same error on my site once again.

July 16, 2019 at 8:15 pm #4223719

linaD

Hi Riffaz, regarding your last private message, I'm getting the following error attached in the screenshot. I think it's because there is no input field to add DB password. I've tried it a couple of times, still the same.

Moreover, can you please make my following replies private.

July 17, 2019 at 7:18 am #4226527

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Can I do the migration for you?

Regards,

July 18, 2019 at 9:28 pm #4242423

linaD

Sure. You can do anything you need. I have a complete backup.

July 21, 2019 at 3:03 pm #4252627

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

The migration is completed: hidden link
I'll update you again once we found the solution after checking this completely.

Regards,

July 22, 2019 at 8:28 am #4254823

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

We double and triple checked your site and the migrated site.
We are unable to reproduce the issue now.
It seems somehow this has been fixed with or without your knowledge.
Are you able to reproduce this issue in your site or in the migrated site now?

Let me know.

Regards,

July 22, 2019 at 5:07 pm #4260313

linaD

Hi Riffaz,

Actually I'm not able to reproduce this anymore. Since opening this issue I've updated most of my plugins + resynced link targets (image attached). My only suggestion is one of those things solved the issue. Thank you for your help.

July 22, 2019 at 5:08 pm #4260365

linaD

My issue is resolved now. Thank you!