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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | node-filter.patch | 2.14 KB | bylund |
| admin_node.patch | 2.13 KB | bylund |
Comments
Comment #1
Steve Dondley commentedI 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.
Comment #2
dries commentedThe patch uses
mysql_functions instead of Drupal'sdb_functions (database abstraction layer). Also, the patch makes Drupal emit HTML that won't validate as XHTML.Comment #3
bylund commentedThe attached patch uses the
db_functions. About the invalide XHTML, I don't see how this patch could cause it. It seems to be theform_checkboxfunction that outputs it.Comment #4
dries commentedCommitted. Thanks.
Comment #5
(not verified) commented