Notice: Undefined property: stdClass::$translations in commerce_product_ui_form_commerce_product_ui_product_form_alter() (line 474 of drupal_path/sites/all/modules/contrib/commerce/modules/product/commerce_product_ui.module).

Notice: Trying to get property of non-object in commerce_product_ui_form_commerce_product_ui_product_form_alter() (line 486 of drupal_path/sites/all/modules/contrib/commerce/modules/product/commerce_product_ui.module).

Warning: Invalid argument supplied for foreach() in commerce_product_ui_form_commerce_product_ui_product_form_alter() (line 486 of drupal_path/sites/all/modules/contrib/commerce/modules/product/commerce_product_ui.module).

These are the errors that the system throws on the Create a product form for a product type that have Multilingual support Enabled via Entity translation.
No errors on edit products.

It seems that the Commerce Product UI assumes that this (translations) data exists, BUT at the moment 0 of the Product it doesn't exist.

#4 1597946.entity_translation.patch1.82 KBrszrama
PASSED: [[SimpleTest]]: [MySQL] 3,588 pass(es). View
#1 Entity_translation_integration_error-1597946-1.patch788 bytesvasike
PASSED: [[SimpleTest]]: [MySQL] 3,567 pass(es). View


vasike’s picture

Status:Active» Needs review
788 bytes
PASSED: [[SimpleTest]]: [MySQL] 3,567 pass(es). View

this could be a solution

Stan Shevchuk’s picture

#1 works for me.

Thanks, vasike

(BTW, 1.3 is also affected by this, not just dev)

vasike’s picture

Status:Needs review» Reviewed & tested by the community

i think we can consider tested.

rszrama’s picture

Status:Reviewed & tested by the community» Needs review
1.82 KB
PASSED: [[SimpleTest]]: [MySQL] 3,588 pass(es). View

Putting up a different approach for testing that instead uses the entity translation handler directly instead of hard-coding assumptions about the translations key and duplicating a default translations object.

rszrama’s picture

Status:Needs review» Fixed

Test bot says we're clear, so committing. Please reopen if you still have any trouble here.

vasike’s picture

test the last dev. error vanished.
so i think fixed (to closed) it's the right status for the issue.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jalves’s picture

Status:Closed (fixed)» Needs review


i'm trying to apply the patch on 1.3 version, no success... is there a new patch?

rszrama’s picture

Status:Needs review» Closed (fixed)

This patch has already been committed to 1.x-dev. It's likely some intermediate patch between 1.3 and the time I committed it affected the same code. You could just update to the latest dev. No need to reopen this.

jalves’s picture

Thank you! Just upgraded and it's solved.