Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Getting a fatal error when updating to D6.x on a site that has had the book module enabled in the past, but where it is disabled at the time of the upgrade. The message is:
Call to undefined function book_menu_name() in .... book.install on line 217
I think the problem is that we need to make sure the book module is enabled or included before running that update. I think this is because of the change to update disabled modules.
Comment | File | Size | Author |
---|---|---|---|
#3 | book.install.patch | 687 bytes | KarenS |
#2 | book-update-should-not-rely-on-the-api.patch | 790 bytes | Gábor Hojtsy |
Comments
Comment #1
Gábor HojtsyI'd rather include this functionality verbatimg there, given that book_menu_name() is this:
Update functions should rather not depend on API functions.
Comment #2
Gábor HojtsyTest this please. (There might be other API functions used).
Comment #3
KarenS CreditAttribution: KarenS commentedOK, that change worked. Patch attached.
Comment #4
KarenS CreditAttribution: KarenS commentedCross-posted, but the patches are the same, and I did test it and did not run into any further problems.
Comment #5
Gábor HojtsyActually, yours would be buggy, as you also replaced $book['bid'] with $book['nid'], so I committed mine. Thanks for testing.
Comment #6
KarenS CreditAttribution: KarenS commentedBah! You're right. Good catch.
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #8
ggevalt CreditAttribution: ggevalt commentedNot sure if we are breaking protocol here, but I'd like to reopen this issue because after hours of searching, we have not found a solution.
We have just updated our test site from 5.19 to 6.1 and we have the exact same error when we run update.php. It then aborts the update and, it appears, our book content is missing. We have not drilled down that deeply into the problem; I will update with more specifics OR can someone direct me to more current information on this problem. ie., was this still a problem in 6.1 and we should go with a later version of 6 to make the upgrade with? ie., should we take steps in advance of the upgrade that we did not know about?
THANKS so much.
(And I realize this is near to a forum post, but please forgive. You have this problem listed as a bug in the .dev version so it seems logical that this problem may have persisted in released versions.)
geoff
Comment #9
Gábor HojtsyYou should definitely update to the 6.x latest version given all the bug and security fixes. This was fixed before 6.0 was released, so it is not related to your issue.