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.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Danny_Joris created an issue. See original summary.

Danny_Joris’s picture

Issue summary: View changes
Danny_Joris’s picture

Issue summary: View changes
m4olivei’s picture

Status: Active » Postponed (maintainer needs more info)

Could you provide steps to reproduce the issue, so I can more easily debug this?

dalin’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Postponed (maintainer needs more info) » Needs review
FileSize
1.51 KB

The problem is that hook_init() is not called for hook_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.

dalin’s picture

Whoops, it looks like the previous patch missed both `use` statements, and the cases when objects are unserialized.

dalin’s picture