Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
While embedding a "node add form" to a page (not using the "Node add/edit form" task) I noticed the node_add_form context isn't providing the node object to the context data, rather just the node type.
As a result I'm seeing this error (from a plain-vanilla Drupal install):
EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7410 of /Users/me/Sites/drupal-7.x/includes/common.inc).
The patch in the comments provides the node object to the context data, and also updates the convert callback.
Comment | File | Size | Author |
---|---|---|---|
#1 | node-add-1395628-1.patch | 1.16 KB | helior |
Comments
Comment #1
helior CreditAttribution: helior commentedPatch.
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commented