It happened today, that I had to update one of our very first Drupal 8 sites, where the codebase is already several months old. While updating Pathauto, I couldn't move on because update 8100 failed with the following error:

Error: Call to undefined method Drupal\pathauto\Entity\PathautoPattern::addContext() in pathauto_update_8100() (line 204 of /var/www/drupalvm/web/modules/pathauto/pathauto.install).

This function was removed in #2660236: Wrong export of context_definitions resulting in Fatal error node form

Patch attached

CommentFileSizeAuthor
fix_pathauto_update_8100.patch567 bytesagoradesign

Comments

agoradesign created an issue. See original summary.

agoradesign’s picture

Status: Active » Needs review
berdir’s picture

Yeah, that's why you shouldn't use entity API in update functions. Don't forget to set to needs review when you provide a patch.

Sometimes patches uploaded when the issue is created don't get tested, but there are no tests for update functions anyway.

berdir’s picture

Status: Needs review » Fixed

Committed.

  • Berdir committed 9a12737 on 8.x-1.x authored by agoradesign
    Issue #2816989 by agoradesign: Update 8100 does not apply anymore with...

Status: Fixed » Closed (fixed)

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