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

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

StatusFileSize
new8.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.

astonvictor’s picture

Status: Needs review » Closed (outdated)

D7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.