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.
I use redirect_delete($rid);
somewhere in an update hook, and it trigger a fatal applenews error. Apple News gets triggered when an entity is removed and in the update cycle the PublisherAPI library isn't included: http://cgit.drupalcode.org/applenews/tree/applenews.entity.inc
WD php: Error: Class 'ChapterThree\AppleNewsAPI\PublisherAPI' not found in applenews_publisher_api() (line 20 of [error]
/sites/all/modules/contrib/applenews/applenews.publisher_api.inc).
Cannot modify header information - headers already sent by (output started at /profiles/publisher/modules/contrib/ctools/includes/context.inc:30)[warning]
bootstrap.inc:1242
Error: Class 'ChapterThree\AppleNewsAPI\PublisherAPI' not found in applenews_publisher_api() (line 20 of /sites/all/modules/contrib/applenews/applenews.publisher_api.inc).
Drush command terminated abnormally due to an unrecoverable error.
Comment | File | Size | Author |
---|---|---|---|
#6 | 2884200-applenews-load_libraries-6.patch | 2.72 KB | dalin |
Comments
Comment #2
Danny_Joris CreditAttribution: Danny_Joris at Lullabot commentedComment #3
Danny_Joris CreditAttribution: Danny_Joris at Lullabot commentedComment #4
m4oliveiCould you provide steps to reproduce the issue, so I can more easily debug this?
Comment #5
dalinThe problem is that
hook_init()
is not called forhook_update_N()
functions.https://api.drupal.org/comment/60111#comment-60111
Rather than loading the PHP libraries on every pageload we should instead only be loading the libraries when needed.
Comment #6
dalinWhoops, it looks like the previous patch missed both `use` statements, and the cases when objects are unserialized.
Comment #7
dalin