1st: I get this error on any of the admin pages:
warning: Invalid argument supplied for foreach() in /home/.../public_html/drupal/sites/all/modules/node_widget/includes/node_widget.form.inc on line 166.

2nd: Node revisions are not being created when editing nodes referenced in the node widget form.

Other than that, love the module so hopefully we can get the above fixed to make it just a bit more solid.

Thanks!

CommentFileSizeAuthor
#2 node_widget.patch908 byteswojtha

Comments

wojtha’s picture

I'm getting same error (node_widget:166), but not on the all admin pages: for now, I'm experiencing it only at the Panels 3/CTools Page manager (admin/build/pages).

wojtha’s picture

Title: A couple issues... » Foreach() error in node_widget.form.inc:166 + node revisions are not being created
Status: Active » Needs review
StatusFileSize
new908 bytes

I see whats happening. In the function node_widget_get_fields(&$form) there is a check whether exists $form['type'] or not and if exists it attempts to process it. So Node Widget tries to alter all forms which has $form['type'] element.

Patch attached.

Patch adresses only the foreach bug.

Michsk’s picture

Status: Needs review » Reviewed & tested by the community

This fixes it.

2ndmile’s picture

Fixed it for me as well. Thanks!

rv0’s picture

fixed it for me too.. thanks!