There are two bugs (in /admin/node/):

1) Pressing the 'Go' update button when there are no posts returns the following warning:
warning: Invalid argument supplied for foreach() in .../modules/node.module on line 684.

2) Pressing either of the 'Go' buttons executes both the filtering and the update action.

The attached patch fixes both these bugs by testing which button was pressed, making sure there are selected posts before updating and also by making the update controls disabled when there are no posts to select.

This applies to 4.4.0 and probably to CVS as well.

CommentFileSizeAuthor
#3 node-filter.patch2.14 KBbylund
admin_node.patch2.13 KBbylund

Comments

Steve Dondley’s picture

I can confirm item #1. I'm seeing the same error.

Also, I don't think the filter is working for the first option, "View posts that are new or updated". After I press go, with that option selected, all nodes get returned.

dries’s picture

The patch uses mysql_ functions instead of Drupal's db_ functions (database abstraction layer). Also, the patch makes Drupal emit HTML that won't validate as XHTML.

bylund’s picture

StatusFileSize
new2.14 KB

The attached patch uses the db_ functions. About the invalide XHTML, I don't see how this patch could cause it. It seems to be the form_checkbox function that outputs it.

dries’s picture

Committed. Thanks.

Anonymous’s picture