Using the walk-through in the two comments #2470185-11: [meta] Provide a 8.0.0-beta9 to 8.0.0-beta10 upgrade path and #2470185-17: [meta] Provide a 8.0.0-beta9 to 8.0.0-beta10 upgrade path I attempted to run the update from 8.0.0-beta9 to beta10. It ran 4 of the 12 updates but failed on 81000 with the following error:
Failed: Drupal\Component\Plugin\Exception\PluginNotFoundException: The "taxonomy_term_reference_link" plugin does not exist. in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 57 of /var/www/site/docroot/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
Since it failed there, that and the subsequent updates didn't run and taxonomy references weren't converted.
Here's the sequence I went through:
- Cloned head2head.
- Enabled head2head and beta2beta.
- Set the last version as beta9 at
admin/config/development/beta2beta
- Updated code base to beta10, including copying changes to default.services.yml and default.settings.php to the live versions of those.
- Rebuilt cache (
drush cr -y
). - Re-logged in.
- Visited update.php and ran 12 listed updates. Got the error shown above.
- Rebuilt cache (
drush cr -y
) again. - Took the site out of maintenance mode.
- When I visited a node-edit form with a taxonomy reference, I got a site error. The error log indicated that the taxonomy reference hadn't been updated.
- Visited update.php again and there were 8 updates left.
- Ran the updates and got the same error.
At that point I was stuck.
Comment | File | Size | Author |
---|---|---|---|
#8 | interdiff.txt | 3.21 KB | amateescu |
#8 | 2482357-8.patch | 4.59 KB | amateescu |
#7 | 2482357.7.patch | 4.57 KB | alexpott |
#7 | 6-7-interdiff.txt | 1.83 KB | alexpott |
#6 | 2482357.patch | 3.04 KB | amateescu |
Comments
Comment #1
rootworkSo I tried enabling beta2beta and running update.php prior to updating the codebase to b10. In that case, there were 9 updates to run, but it still got stuck on 81000 and gave me the same error. When I then updated the code, rebuilt the cache, and went to update.php again, there were still 12 updates to run (same as the first time around) and it once again got stuck on 81000.
Let me know if there's any more information I can provide.
Comment #2
amateescu CreditAttribution: amateescu for Drupal Association commentedSounds like you have an entity base field using the old taxonomy formatter that was removed in #1847596: Remove Taxonomy term reference field in favor of Entity reference.
Can you please try to search your codebase for 'taxonomy_term_reference_link' and post the results here?
Comment #3
amateescu CreditAttribution: amateescu for Drupal Association commentedA bit more information on that:
head2head_1847596()
only updates *configurable fields* (those that are created through Field UI or with default config). If there is any code that's using / referencing the old formatter (like an entity base field), the code has to be updated manually :)Comment #4
amateescu CreditAttribution: amateescu for Drupal Association commentedComment #5
rootworkThanks for your help!
Yes, it's definitely about taxonomy reference fields that need to be updated. Everything was configured through the UI, then exported to config -- I didn't create any fields through custom modules, if that's what you mean.
taxonomy_term_reference_link
shows up in a bunch of places in the exported config (staging) but since Drupal isn't reading from that and it would get overwritten on the next export I presume that isn't an issue.Other places
taxonomy_term_reference_link
shows up after updating the codebase to beta10--In
core/modules/taxonomy/tests/upgrade/drupal-7.taxonomy.database.php
:In
core/scripts/generate-d7-content.sh
:and that's it.
Comment #6
amateescu CreditAttribution: amateescu for Drupal Association commentedHmm, that means some code is trying to instantiate an old taxonomy formatter in update.php, which should not happen normally. Can you try to see if this patch helps?
You need to apply it to the head2head module, clear the caches and then go to update.php and run the updates again :)
Comment #7
alexpottAnd there is a widget too.
Comment #8
amateescu CreditAttribution: amateescu for Drupal Association commentedI'm really curious how can a field widget be instantiated in update.php, that sounds pretty crazy :) Can someone please post a backtrace of that?
Anyway, it doesn't really hurt anything to also have the widget override and, apparently, @alexpott also hit this bug when he tried to update a D8 site, so I committed the patch attached to 8.x-1.x. Thanks everyone!
Comment #10
rootworkTook me awhile to circle back to testing this again, but I did and it works great. Thanks SO much for addressing this! Really appreciate it.