Problem/Motivation

The amp_update_8002() is problematic because it is calling in the middle of an hook_update_N() and then going on to use the full entity API.

One thought is that this might be related to https://www.drupal.org/node/2861863

Proposed resolution

Empty out this update an move it to a post update hook.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
FileSize
4.98 KB

Here's a patch

alexpott’s picture

FileSize
558 bytes
5 KB

Whoops.

dawehner’s picture

+++ b/amp.install
@@ -52,63 +49,9 @@ function amp_update_8001(&$sandbox) {
+ * @see https://www.drupal.org/node/2867636
  */
...
+function amp_update_8002() {
 }

You could also drop it and implement hook_update_last_removed

KarenS’s picture

I like the last option, just remove the update. Having those image styles is not critical to the AMP functionality so it's not worth breaking things. There's now a later update too that actually is more important. Earlier update didn't apply any more so this is a new patch.

  • KarenS committed a38f658 on 8.x-1.x
    Issue #2867636 by alexpott, KarenS, dawehner: amp_update_8002() should...
KarenS’s picture

Status: Needs review » Fixed

Committed! Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.