Below error message :
TITLE OF MY BOOK XXXX
* warning: array_keys() [function.array-keys]: The first argument should be an array in /MY PATH WEB SITE/drupal/modules/book/book.admin.inc on line 95.
* warning: array_flip() [function.array-flip]: The argument should be an array in /MY PATH WEB SITE/drupal/modules/book/book.admin.inc on line 95.
* warning: array_merge() [function.array-merge]: Argument #1 is not an array in /MY PATH WEB SITE/drupal/modules/book/book.admin.inc on line 96.
TITLE OF MY PAGE XXXX
Titre Poids Parent Opérations
After this, I see correctly my page on web site.
My status report :
Status report
Here you can find a short overview of your site's parameters as well as any problems detected with your installation. It may be useful to copy and paste this information into support requests filed on drupal.org's support forums and project issue queues.
Drupal 6.1
Access to update.php Protected
Configuration file Protected
Cron maintenance tasks Last run 1 jour 1 heure ago
You can run cron manually.
Daily module vocabulary Forums
Database updates Up to date
Drupal core update status Up to date
File system Writable (public download method)
GD library bundled (2.0.34 compatible)
Image module directories Exists (sites/default/files/images)
Image toolkit The gd toolkit is installed
Module and theme update status Up to date
MySQL database 5.0.45
PHP 5.2.5
PHP memory limit 48M
PHP register globals Désactivé
Unicode library PHP Mbstring Extension
Update notifications Activé
Web server Apache
I hope this
Driss
Comment | File | Size | Author |
---|---|---|---|
#18 | book.admin_.inc-check_empty-0-D6.patch | 751 bytes | mdupont |
#18 | book.admin_.inc-check_empty-0-D7.patch | 763 bytes | mdupont |
#15 | book.admin_.inc_.3.patch | 688 bytes | mdupont |
#13 | book.admin_.inc_.2.patch | 853 bytes | yettyn |
#11 | book.admin_.inc_.patch | 763 bytes | yettyn |
Comments
Comment #1
mot CreditAttribution: mot commentedI got this Error Messages in version 6.2 while I deleted all pages of a book and then saving the book pages. I can report these errors:
I assume this is the same type of error.
Comment #2
mot CreditAttribution: mot commentedChanged to Version 6.2 because I got this with 6.2 and it is still not solved.
Comment #3
pwolanin CreditAttribution: pwolanin commentedbugs against HEAD (7.x). Don't assign to yourself unless you are fixing it.
Comment #4
mot CreditAttribution: mot commentedCreated a patch against 6.4. The problem can be easily fixed, the error messages appear while the book is saved with no pages. A check for that was missing:
Comment #5
mot CreditAttribution: mot commentedAdded patch as attachment, might make things easier.
Comment #6
pwolanin CreditAttribution: pwolanin commentedThanks for the insight into the bug. I'd probably write:
as
however, we might also be able to attack this by setting up better defaults in the form.
Comment #7
mot CreditAttribution: mot commentedEmpty checks for an empty string or a 0. I can not see why this should lead to something. I guess you mean Isset();.
Comment #8
pwolanin CreditAttribution: pwolanin commentedempty also checks for !isset, empty array, etc. !isset() would be reasonable too, and would match exactly your logic but in a different form.
Comment #9
mot CreditAttribution: mot commentedThanks for the insight, I was not that aware about empty. Then I might give Isset() a go because it more clearly matches my intention in the fix and is faster then array_key_exists(). The patch needs a change then.
Comment #10
yettyn CreditAttribution: yettyn commentedJust passing by ;-) but notice the following; The patch attached to this issue is currently for 6.4 while the issue is flagged as 7.x and hence show up in the "Patches to review (D7)" link on frontpage - witch is kinda misleading. So shouldn't this patch really be done for 7.x and then back ported to 6.x?
just chiming in with my eyes
Comment #11
yettyn CreditAttribution: yettyn commentedok no reason really I cannot provide the patch so here it is, built against latest HEAD (7.x).
Comment #12
mot CreditAttribution: mot commentedThanks for the patch, I ran out of time the last days. Please check the following:
$order = array_flip(array_keys($form['#post']['table']));
$form['table'] = array_merge($order, $form['table']);
this code is executed before you check that $form['#post']['table'] actually is not empty. but only afterwards the check this could be assumed. so therefore the added checks have to be lifted above these lines, shouldn't they?
I dunno wether or not these routines need to be very pedantic in their checks (i normally love that) so some infos would be nice for me to know. possible additionally checks could be:
* is $form an array?
* is $form['#post'] empty?
Comment #13
yettyn CreditAttribution: yettyn commentedMy bad, correct patch attached against latest HEAD.
Comment #14
Anonymous (not verified) CreditAttribution: Anonymous commentedThe last submitted patch failed testing.
Comment #15
mdupontRerolled against latest 7.x. The function is exactly the same than in D6.
Comment #16
mdupont#13: book.admin_.inc_.2.patch queued for re-testing.
Comment #18
mdupontAttached updated patches for D6 and D7. This time they should complete the tests.
Comment #19
mgiffordNo longer applies.