This is a regression from #1661066: Add a helper for getting the controller.
We should probably unprotected $controller->entityType and use that to fetch the info.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rogical’s picture

Notice: Undefined variable: entity_info in inline_entity_form_field_widget_settings_form() (line 233 of /opt/production/pjkaixin/sites/all/modules/inline_entity_form/inline_entity_form.module).

same issue

rogical’s picture

Status: Active » Needs review
FileSize
604 bytes
angheloko’s picture

Also encountering same error. Patch in #2 works for me.

Thanks.

pjcdawkins’s picture

FileSize
1.02 KB

The patch in #2 would stop the notice, but it shows the wrong label (the field instance label, rather than the entity type label). Here's a patch (attached) that's more in the spirit of what the code is trying to achieve here, and it's what the OP suggests.

star-szr’s picture

#4 tested and working on the latest 7.x-1.x-dev.

To be more specific, this notice comes up when editing a field with an inline entity form widget. i.e. admin/structure/types/manage/product_display/fields/field_product_variations

theo_’s picture

We need patch from #4 to be commited.

pjcdawkins’s picture

Status: Needs review » Reviewed & tested by the community

Based on the last two comments I'm marking my own patch RTBC.

idflood’s picture

Patch in #4 looks good and fixed the error for me,

dimitriseng’s picture

Patch #4 has fixed the error for me as well, thanks.

Zach Harkey’s picture

Patch #4 has fixed the error for me as well, thanks.

yurg’s picture

Patch #4 has fixed the error for me as well, thanks.

cedricvg’s picture

I Got the same error when adding a entity reference field to a node, patch 4 fixes it for me.

malberts’s picture

Any update on whether patch #4 could get committed? It works and seems simple enough.

manox’s picture

Patch #4 doesn't work for me, get a white page aber patching. Any other solution yet?

Albert Volkman’s picture

@manox please post your apache error log when you get the white page.

Ollie222’s picture

Patch #4 has fixed the error for me as well, thanks.

holdmann’s picture

Version: 7.x-1.x-dev » 7.x-1.0-rc1
FileSize
48.44 KB

Hi!

this patches fix just visual part of problem. Reason of this notice - unserializable json string in field_config_instance.

Thying to unserialize string returns nothing ((bool) false):

kpr(unserialize('a:6:{s:5:"label";s:29:"Связанный товар";s:6:"widget";a:5:{s:6:"weight";s:1:"8";s:4:"type";s:18:"inline_entity_form";s:6:"module";s:18:"inline_entity_form";s:6:"active";i:1;s:8:"settings";a:2:{s:6:"fields";a:0:{}s:13:"type_settings";a:5:{s:14:"allow_existing";i:1;s:14:"match_operator";s:8:"CONTAINS";s:17:"delete_references";i:0;s:18:"autogenerate_title";i:1;s:22:"use_variation_language";i:0;}}}s:8:"settings";a:3:{s:15:"field_injection";i:1;s:19:"referenceable_types";a:2:{s:11:"tea_product";s:11:"tea_product";s:13:"other_product";i:0;}s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:30:"commerce_cart_add_to_cart_form";s:6:"weight";s:1:"4";s:8:"settings";a:5:{s:13:"show_quantity";b:0;s:16:"default_quantity";i:1;s:7:"combine";b:1;s:30:"show_single_product_attributes";b:0;s:14:"line_item_type";s:7:"product";}s:6:"module";s:13:"commerce_cart";}}s:8:"required";i:0;s:11:"description";s:0:"";}'));

Any suggestion?

pjcdawkins’s picture

Version: 7.x-1.0-rc1 » 7.x-1.x-dev

#17: that is not related to this thread, whatever it is. The patch in #4 is here to fix a straightforward problem, that $entity_info is not defined. It just trivially implements what the OP describes as the solution. It's received 7 positive tests/reviews above. I'm not sure why it hasn't been committed yet.

malberts’s picture

Any update on this?

I used #4 again on another completely different site (a month later).

pjcdawkins’s picture

bojanz’s picture

Status: Reviewed & tested by the community » Fixed

Committed a slightly different fix:
http://drupalcode.org/project/inline_entity_form.git/commitdiff/36af6a8?...

Thank you for your patience. Kickstart contains many modules and I cycle through them.

Status: Fixed » Closed (fixed)

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