Add support for Inline Entity Form to lock and unlock referenced node entities when a user "edits" them inline.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amcgowanca created an issue. See original summary.

amcgowanca’s picture

alberto56’s picture

Status: Active » Needs work

in your patch, content_lock_inline_entity_form_form_alter() calls _content_lock_is_lockable_node() with a node which is not guaranteed to have a nid, which can cause an undefined unless you have added the patch #2682781: In content_lock_content_lock_node_lockable(), do not assume the node has a nid (PHP Undefined property: stdClass::$nid in content_lock.module on line 984).

alberto56’s picture

FileSize
8.39 KB

Nice patch, here is a new version with a few changes:

(1) the patch adds ./content_lock/modules/content_lock_inline_entity_form to ./content_lock, so we end up with ./content_lock/content_lock/modules/content_lock_inline_entity_form if we apply the patch

(2) I think version information is added by the Drupal packaging system, so it should not be added to new modules in a project.

(3) As stated in the previous comment, until #2682781: In content_lock_content_lock_node_lockable(), do not assume the node has a nid (PHP Undefined property: stdClass::$nid in content_lock.module on line 984) makes it in, we need to avoid calling _content_lock_is_lockable_node() with a node which does not have a nid.

pandaski’s picture

Issue tags: +7, +7.x-2.2
pandaski’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
Issue tags: -7

Happy to see it in next release

DamienMcKenna’s picture

Title: Add support for Inline Entity Form » Add support for Inline Entity Form (D7)
DamienMcKenna’s picture

Status: Needs work » Needs review

Please try to remember to set the issue status to "needs review" when you upload a patch. Thanks.