After updating to 3.0-rc1, the entity updates are never completed, we continue to see
solr_field_type entity type :
The Solr Field Type entity type needs to be installed.
Do you wish to run all pending updates? (y/n):
The update never works and it will re-run over and over, with the deprecation notice:
EntityDefinitionUpdateManagerInterface::applyUpdates() is deprecated in 8.7.0 and will be removed before Drupal 9.0.0. Use [notice]
\Drupal\Core\Entity\EntityDefinitionUpdateManagerInterface::getChangeList() and execute each entity type and field storage update manually
instead. See https://www.drupal.org/node/3034742. EntityDefinitionUpdateManager.php:175
We are running Drupal core 8.7, where automatic updates are not supported, so something about the module update is not correct it appears.
Comment | File | Size | Author |
---|---|---|---|
#12 | 3061334_12.patch | 3.82 KB | sagesolutions |
Comments
Comment #2
mkalkbrennerWhy are you updating to 3.0-rc1? Update to 3.1 instead.
The "error" looks strange. Today I run various upgrades to 3.1 starting from different previous versions - also on core 8.7.
And I never faced such a message.
Can you provide more details on ...
- which commands you run?
- which update hook failed?
- stack traces?
- which version of search_api_solr was installed before?
Comment #3
mkalkbrennerno feedback provided
Comment #4
sagesolutions CreditAttribution: sagesolutions commentedI also have the same issue
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Solr Field Type
The Solr Field Type entity type needs to be installed.
This happened when I upgraded from Search API Solr 8.x-1.2 to 8.x-3.2
I also upgraded Search API from 8.x-1.13 to 8.x-1.14
I am currently on Drupal 8.7.5
I ran drush updb and there were quite a number of updates, but all of them completed successfully (or no warnings at least).
From looking at the module, Im guessing
search_api_solr_update_8200
installs the Solr Field Types based on the comment above it, but it also completed without error.Comment #5
mkalkbrennerYou said that all updates succeeded without any error messages. So, when do you see "Mismatched entity and/or field definitions" exactly?
If it occurs after the update, does "drush cr" help?
Which drush version are you using?
Does the same thing happen if you update via the web interface?
Comment #6
mkalkbrennerBTW the upgrade path was developed with Drupal 8.6 and drush 9.6. It might be, that something changed with drupal 8.7 and drush 9.7.
Comment #7
mkalkbrennerMight be related: https://github.com/drush-ops/drush/issues/4070
Comment #8
sagesolutions CreditAttribution: sagesolutions commentedThe error message shows on the status report page at /admin/reports/status, and persists after running
drush cr
.Trying to run
drush entup
returns the following:Drupal removed its automatic entity-updates API in 8.7. See https://www.drupal.org/node/3034742.
I am using drush version 9.7.1
Comment #9
sagesolutions CreditAttribution: sagesolutions commentedAfter some research, I ended up downloading and installing https://www.drupal.org/project/devel_entity_updates
Once enabled, I ran
drush entup
which gave me the following:Once completed, the mismatched entity error went away. Not a great solution, but one that got the job done!
Comment #10
sagesolutions CreditAttribution: sagesolutions commentedOk so I also figured that instead of using the module, I can install the entity type programmatically. If someone else needs this, simply add this to a custom module .install file and run drush updb to remove the warning.
Im not sure if this should be a patch or not. It could replace the search_api_solr_update_8200() function maybe, or maybe its should be its own new update function search_api_solr_update_83xx() ?
Comment #11
mkalkbrennerWow, thank you!
This piece of code should become part of update hook 8200()!
Comment #12
sagesolutions CreditAttribution: sagesolutions commentedUpdated search_api_solr_update_8200() with attached patch. Please review!
Thanks!
Comment #13
mkalkbrennerThe comment is still valid.
Are you sure that this line isn't required?
Shouldn't it be called after the Field Type entity is installed?
Or will this installation implicitly install all instances?
In former drush/core versions only the first line of the comment was printed on console. We need to check if that changed.
Comment #15
mkalkbrennerI tested another 1.x to 3.x upgrade and it worked. Thanks for your contribution!