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.

CommentFileSizeAuthor
#1 node-add-1395628-1.patch1.16 KBhelior
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

helior’s picture

Status: Active » Needs review
FileSize
1.16 KB

Patch.

merlinofchaos’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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