While visiting the settings page, I get the following error / notice messages:
notice: Undefined index: access in /Library/WebServer/Documents/dr61/sites/all/modules/book_access/book_access.module on line 363.
warning: Invalid argument supplied for foreach() in /Library/WebServer/Documents/dr61/sites/all/modules/book_access/book_access.module on line 363.
There was no book pages, but the code doesn't check if there are any, before to show its form fields.
The consequence is that, apart those errors, the form appears empty, without any advice for the user. It would be enough that the module would report a message to the user, saying that there are no books defined.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | book_access_admin_settings_errors.patch | 1.31 KB | ilo |
Comments
Comment #1
ilo commentedOk, it is not only that error shows when there is no book and you click submit, but also old book grant records are not removed from database.
Book access administrator users still require the "Rebuild node access" action to be able to clean current book access grants (even if no book is availabe), so the button can't simply be disabled.
This patch cleans the old entries and fixes the drupal_write_record sloppy usage, as now all entries are re-inserted.
Comment #2
avpadernoAnother patch bites the dust... :-)