I have Drupal 8 installed beginning of RC1 and afterward upgraded successfully up to 8.0. The status report page from the very first version is displaying:
Entity/field definitions Mismatch detected
Mismatched entity and/or field definitions.
Currently I have some common extensions installed but at the beginning the error was displayed even in the core.
My webpage is in polish language.
I was trying to install drush tu update entities but can't get it working properly (http://drupal.stackexchange.com/questions/179201/command-entity-updates-...).
Comment | File | Size | Author |
---|---|---|---|
#114 | Sélection_012.png | 32.01 KB | steveoriol |
#110 | field_definitions.png | 7.02 KB | handkerchief |
#105 | Status report Mantance.png | 102.31 KB | FlutterStack |
#42 | Clipboard04.png | 15.56 KB | vibrasphere |
#8 | Screen Shot 2015-12-24 at 4.39.30 PM.png | 62.07 KB | enginpost |
Comments
Comment #2
marcingy CreditAttribution: marcingy at Examiner.com commentedI believe this is duplicate of #2597628: Enabling translation for menu links / taxonomy terms results in "Entity/field definitions" -- "Mismatch detected" on reports/status page.
Comment #3
Abdel5 CreditAttribution: Abdel5 commentedI reopen this as the issue marked as duplicate was fixed and in my case the problem persists after upgrade to Drupal 8 RC 4.
Comment #4
Abdel5 CreditAttribution: Abdel5 commentedI have the same error after upgrade to D8.
Comment #5
cilefen CreditAttribution: cilefen commented@Abdel5 Could you please enhance the issue summary with any more information you have on the issue, such as what action triggers the error?
Comment #6
Abdel5 CreditAttribution: Abdel5 commentedComment #7
Abdel5 CreditAttribution: Abdel5 commentedComment #8
enginpost CreditAttribution: enginpost as a volunteer commentedAfter installing pathauto and token into drupal core 8.0.0 and upgrading to 8.0.1 I started getting the error depicted in the attached image:
Entity/field definitions Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Content
Delete the URL alias field.
Taxonomy term
Delete the URL alias field.
Is this a bug? Is it related? I have no idea how to fix this.
Comment #9
JotaMG CreditAttribution: JotaMG as a volunteer commentedMe too, after upgrading from 8.0.1 to 8.0.2...
So, same questions as post above...???
Comment #10
Abdel5 CreditAttribution: Abdel5 commentedHi. in my case the error is in http://uzbrojeni.pl/admin/reports/status is currently:
Comment #11
Wilfred Waltman CreditAttribution: Wilfred Waltman commentedI used "drush entity-updates" to fix the errors I had.
Comment #12
petiar CreditAttribution: petiar as a volunteer commentedI have the same error in the status report, but I do not have drush - is there any way how to do the "entity-updates" via UI?
Comment #13
cilefen CreditAttribution: cilefen commentedI think visiting /update.php would do it but I could be mistaken.
Comment #14
TheThemerist CreditAttribution: TheThemerist commentedSame error message as enginpost in #8
After installing pathauto (8.x-1.0-alpha1) and token (8.x-1.0-alpha2) on Drupal 8.0.2
Have cleared cache, rebuilt and update.php to no avail.
'drush entity-updates' results in 'Drush was not able to start (bootstrap) the Drupal[error]
database' error. - I'm working on MAMP atm, so that's probably another can of php worms
Comment #15
Abdel5 CreditAttribution: Abdel5 commentedVisting update page does not help and in my case drush was not working either.
Comment #16
john.oltman CreditAttribution: john.oltman commenteddrush entity-updates worked for me as well.
For themeninja:
If you are on MAMP, look at these articles, adjusting the paths for your version of MAMP and PHP.
http://drupal.stackexchange.com/questions/96803/drush-db-connection-on-mamp
http://drupal.stackexchange.com/questions/32402/drush-and-mysql-database...
For the latter, probably just need this one added to your bash profile:
export PATH="/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php5.4.4/bin:$PATH"
Comment #17
fomenkoandrey CreditAttribution: fomenkoandrey commentedi have the error in Drupal 8.0.2
Comment #18
netlesh CreditAttribution: netlesh as a volunteer commented8.0.3
drush entity-updates
worked for me
Comment #19
petiar CreditAttribution: petiar as a volunteer commentedCan somebody explain what drush actually does? I have my website on hosting without ssh, I can't use drush, however, I need to fix that problem.
Thanks a lot.
Comment #20
JotaMG CreditAttribution: JotaMG as a volunteer commentedThe same here, no drush... I'm lost!
Anyone can help?
Comment #21
cilefen CreditAttribution: cilefen commentedhttps://github.com/drush-ops/drush/blob/master/commands/core/drupal/upda...
Comment #22
JotaMG CreditAttribution: JotaMG as a volunteer commentedOk, the error is:
Can someone please explain exactly what this means??
I'm new to Drupal and this type of problems, if not properly explained, can be a blocker to my projects.
Comment #23
cilefen CreditAttribution: cilefen commented#21 is in response to #19, "Can somebody explain what drush actually does?".
It executes:
\Drupal::entityDefinitionUpdateManager()->applyUpdates();
and catches a possible exception for logging.Comment #24
petiar CreditAttribution: petiar as a volunteer commentedThanks a lot, cilefen, I have added this piece of code
before $response->send(); in my index.php file, reload the webpage and the problem is gone. Of course, then I removed that block from the index.php.
Comment #25
geraldito CreditAttribution: geraldito as a volunteer commentedThanks petiar, #24 worked for me.
Comment #26
TipiT CreditAttribution: TipiT as a volunteer and at TIP Solutions commented#11 works for me too. Thanks!
Comment #27
Strada CreditAttribution: Strada commented#11 Thanks, it works.
The Drush solution:
http://drushcommands.com/drush-8x/core/entity-updates/
#24 Petiar, your solution works too.
Comment #28
adrian1231 CreditAttribution: adrian1231 commented#24 worked for me as well. For some reason drush (8.0.1) is giving me a bootstrap error when I try to run 'entity-updates'. (drupal 8.0.3)
Comment #29
texis CreditAttribution: texis as a volunteer commented#24 Petiar, your solution works too. Thanks
Comment #30
wightowl CreditAttribution: wightowl commentedFor me this error occurred after adding Pathauto and Token, and updating 8.0.2 to 8.0.3 while following the Drupal 8 Beginner video course on Youtube.
Drush is integrated into the Acquia Dev Desktop 2 program, and available by clicking a button to the right of the 'Local Code' link in the Acquia Dev Desktop 2 window, which you launch to get access to your local site.
Once I found it and got to the command line:
drush entity-updates [Enter]
etc. worked for me. Thanks #11.
Comment #31
Stephen Ollman#11 worked for me also.
Comment #32
agoradesign CreditAttribution: agoradesign commented@wightowl: this is a known issue in Pathauto, but absolutely harmless, see #2661178-4: Error: Mismatched entity and/or field definitions
Comment #33
baltusf CreditAttribution: baltusf commentedHi Petiar,
Which index.php did you modified for a short time?
Thanks,
Fred
Comment #34
sense-designThe ROOT index.php of Drupal
Comment #35
Antikpred CreditAttribution: Antikpred commentedDR core 8.0.3
PHP 7.0.3
drush entity-updates
It's worked for me!
Comment #36
Eric Tiggemann CreditAttribution: Eric Tiggemann commented#24 Petiar, Thanks a lot. Your solution worked very well for me, too.
Comment #37
chgasparoto CreditAttribution: chgasparoto commented#24 worked for me in 8.0.5. Thanks man!
Comment #38
topsitemakers CreditAttribution: topsitemakers commented#11 worked for me as well - just run
drush entity-updates
should fix it.Comment #39
hamrant CreditAttribution: hamrant at DEWEB Studio for Drupal Ukraine Community commentedThanks, Wilfred Waltman, #11 worked for me.
Drupal 8.0.5
PHP 5.6.16
Comment #40
bludy1 CreditAttribution: bludy1 commentedI was getting the same error in my status report after installing a few basic contrib modules:
"Entity/field definitions Mismatch detected
Mismatched entity and/or field definitions"
After reading through this thread, I decided to try running update.php, but that didn't get rid of the error. So I decided to try removing modules one by one to see which was causing it. I removed the Pathauto module first and the error was gone.
If anyone knows what I can do to be able to use Pathauto, I'd be extremely grateful. Thanks!
Comment #41
agoradesign CreditAttribution: agoradesign commented@ludwebdes: see my comment #32 and the referenced issue. You can safely use Pathauto. The only problem is, that Pathauto uses computed fields, that are currently incorrectly marked as field definition mismatch. There's an open core issue about that already #2673628: Ignore field definition removals/additions from fields with custom storage
Comment #42
vibrasphere CreditAttribution: vibrasphere commentedComment #43
apermuy CreditAttribution: apermuy commented#11 works fine for me. Thanks a lot!
Comment #44
gplayer01 CreditAttribution: gplayer01 commented@enginpost Drupal Core: 8.06 I had the same issue and ran the following in terminal: drush entity-updates
Comment #45
targoo CreditAttribution: targoo at MariqueCalcus commentedThanks petiar, #24 worked for me.
Comment #46
jfha73 CreditAttribution: jfha73 commenteddrush entity-updates
Worked for me too, thanks.
Comment #47
webmens CreditAttribution: webmens commented#24 worked for me!
drush entity-updates
didn't work for me. Maybe this has something to do with my bootstrap 3 theme.UPDATE: php.ini error solved by removing space before text. Bootstrap issue is probably because I use an old version of drush. You should probably update drush before trying to use #11
Comment #48
jprstoney CreditAttribution: jprstoney commented#24 worked for me. Many thanks.
Comment #49
criscomdrush entity-updates
worked for me.Comment #50
sashkernel CreditAttribution: sashkernel commented#24 worked for me.
Comment #51
johnno123456 CreditAttribution: johnno123456 commentedThank you Petiar. This worked for me.
This is one of the scary things about Drupal for implementers as distinct from developers.
I have absolutely no understanding of the processes that took place that fixed this issue.
Comment #52
cilefen CreditAttribution: cilefen commented@johnno123456 The source code for EntityDefinitionUpdateManager should shed some light on that for anyone who wants to know.
Note, the fact that this happens at all is an open issue.
Comment #53
digitaldonkey CreditAttribution: digitaldonkey commented#11 helped me on my plain d8
Comment #54
TheDucksLover CreditAttribution: TheDucksLover commented#24 worked for me too ;)
Comment #55
Londova CreditAttribution: Londova commentedIn my case there were errors :
#11 : Command entity-updates needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.
The drush command 'entity-updates' could not be executed. Drush was not able to start (bootstrap) the Drupal database.
#24 : The website encountered an unexpected error. Please try again later.
Log: Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException: The SQL storage cannot change the schema for an existing field (price in commerce_product_variation entity) with data. in Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema->updateSharedTableSchema() (line 1376 of /.../core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php).
Comment #56
cilefen CreditAttribution: cilefen commented@British-Link
Re #11: That drush error and its solution(s) are well documented elsewhere. It's nothing to do with this specific issue. Without a doubt you cannot execute most drush commands at the moment.
Re #24 That means what it says as far as I know. I'm not sure what comfort that is.
Comment #57
rosso69 CreditAttribution: rosso69 commented#11 helped for me.
Using drush 8.0.3
Comment #58
numerabilis CreditAttribution: numerabilis commenteddrush entity-updates
worked for me! Thanks!Deu certo! Obrigado!
Comment #59
atul_shin CreditAttribution: atul_shin commentedIf drush not available #24 is best solution for entity fixes, great help.
thanks
Comment #60
osmanIf you have Devel module installed, you can also use the "Execute PHP Code" page at http;//example.com/devel/php
Comment #61
Londova CreditAttribution: Londova commentedIn my case, worked a modified command (may be a different version of DRUSH)
drush entup
Comment #62
osman@British-Link
entup
is in fact an alias of the original commandentity-updates
Try running
drush help entity-updates
on command line. It should output something like this:Comment #63
Niyas CreditAttribution: Niyas as a volunteer and at Gloniuz commentedHope this article helps:-
http://www.glonius.com/drupal/solving-mismatched-entity-andor-field-defi...
Comment #64
illutek CreditAttribution: illutek commentedThanks petiar, #24 worked for me just fine.
Comment #65
fomenkoandrey CreditAttribution: fomenkoandrey commentedNiyas:
did (2), as described in the article, the error disappeared!
Thank you!!!
Comment #66
bas.bakker CreditAttribution: bas.bakker commentedHad the exact same message as #8.
Drupal 8.1.7
drush entity-updates works great
Comment #67
andypostThis should be fixed in upcoming version
Comment #68
andypostBasically this issue affects file_entity module and contact storage - that solved by hack #2629540: Mismatched entity and/or field definitions after installing module
Comment #69
jason.blanda CreditAttribution: jason.blanda commentedAlso confirming #24 worked for me.
Comment #70
Christophe Bourgois CreditAttribution: Christophe Bourgois commenteddrush entity-updates worked for me as well.
Comment #71
nateB CreditAttribution: nateB as a volunteer commented#11 did it for me.
Comment #72
Thomas Kaisuka CreditAttribution: Thomas Kaisuka commenteddrush entity-update worked for me too. Using 8.13
Comment #74
zapo CreditAttribution: zapo commentedDrupal 8.1.8, #11 worked for me. Thanks Wilfred Waltman!
Comment #75
tlito CreditAttribution: tlito commentedcan you offer solution for virtual hosting where I have not ssh and drush? - I save on hosting plan.
Comment #76
osman@tlito see comment #60
Comment #77
majidabed CreditAttribution: majidabed commented#24 works for me too
Thanks
Comment #78
Londova CreditAttribution: Londova commentedAfter latest Drupal Commerce updates, I have the following message:
---
Mismatched entity and/or field definitions.
Line item. The Data field needs to be uninstalled.
---
After running the command "drush entup", I got the following ERROR:
---
Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException:
Unable to delete a field (data in commerce_line_item entity) with data that cannot be purged. in Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema->onFieldStorageDefinitionDelete() (line 410 of /home/weblinux/public_html/drupal-8/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php).
---
Is there any solution to this problem?
Comment #79
agoradesign CreditAttribution: agoradesign commented@British-Link: as Commerce is still in dev, there won't be any update scripts before beta1. Therefore using it implies that you have to carefully watch the changes before running updates. If e.g. entity definitions change, you have to run drush entup, you may need to update configurations manually,..
Yesterday, one of the commits removed the "data" field from line items, as it was considered as unnecessary: https://www.drupal.org/node/2788769
It seems, that you are relying on that. That's not a big problem. You have to implement https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!entity.api... in a custom module and re-add the field again.
Comment #80
Londova CreditAttribution: Londova commentedThank you @agoradesign.
Actually I succeed to update the entities (issue #78) after I delete all orders, including those in carts.
Comment #81
ashokshrestha CreditAttribution: ashokshrestha as a volunteer commentedI have pathauto module enabled. When i disabled this module the error removed. But when i enabled pathauto again the error occured again. Is this issue with pathauto module??
Comment #82
Stephen Ollman#11 works also for 8.2.0-rc1
Comment #83
Joram CreditAttribution: Joram commented#24 worked for me for Drupal version 8.1.9.
Comment #84
dani3lr0se CreditAttribution: dani3lr0se as a volunteer commented#11 - Running `drush entup` worked for me as well. I'm also on 8.1.9. Thanks.
There is also this reference to a DrupalEasy blog post that helps too.
Comment #85
thomas.frobieter#60 worked great for me. Thanks alot!
Comment #86
Jorgas CreditAttribution: Jorgas as a volunteer commented#24 worked fo me. I had this issue after installing pathauto module.
Drupal v. 8.2.0-beta3
Pathauto v. 8.x-1.0-beta1
Comment #87
BerdirThere is no bug here as far as all those contrib reports go.
That's the expected behavior if there are differences, some projects don't support updates for dev/pre-beta, the pathauto use case will be fixed in 8.2.
Comment #88
Garryck CreditAttribution: Garryck commented#24 worked for me, when I ran into this error with 8.1.10. Thanks, petiar!
Comment #89
ckoharj CreditAttribution: ckoharj commentedUsing Drupal 8.2.1
Drush version less than 8 so that won't work for me.
#24 did not work for me. Just gave a blank page.
If you can locate the content type that uses that field, (the machine name is on the manage field page, click the edit button for the fields giving you errors, select the field settings tab and save it.
That cleared the errors for me.
Comment #90
Yzmir Ramirez CreditAttribution: Yzmir Ramirez commentedPHP 5.5.9
Drupal core 8.1.10 upgrade to 8.2.1
Error message: The node.field_######## field needs to be updated.
drush entity-updates
#11 above Fixed the issue.
Comment #91
labiloute@neuf.fr CreditAttribution: labiloute@neuf.fr commented#24 worked for me (8.2.3) ! Cheers :)
Comment #92
sjpagan CreditAttribution: sjpagan commentedMy problem caused from module -> publication_date, this module have't a uninstall function , i try to remove data in db and my operation caused error but
#24 worked for me (8.2.3)
Thank you so much
Comment #93
bogdog400 CreditAttribution: bogdog400 commentedI had to run it twice. But #24 did the job. Thanks!
Comment #94
jwineichen CreditAttribution: jwineichen commented#60 super helpful easy solution
Comment #95
fshequin CreditAttribution: fshequin as a volunteer commented#24 worked for me too....my DRUSH was manually installed and is not setup correctly. So Drush was not an option for me.
Comment #96
milopca CreditAttribution: milopca commented#60 works nice for me
Comment #97
rmedard CreditAttribution: rmedard commented#11 Works. Thanks
Comment #98
Adrian83 CreditAttribution: Adrian83 commentedI've had a number of recent sites where drush entup was failing to clear the error. Here is how I fixed it in one instance:
#12 here fixed one of my errors. After that I could run drush entup to fix the rest of them. After updating webform the 3rd party libraries were out of date, so I needed to run drush webform-libraries-download. Looking good now.
Comment #99
bigsony CreditAttribution: bigsony as a volunteer and commenteddrush entity-updates
worked for me! Thanks!Comment #100
ppiano CreditAttribution: ppiano commented#24 worked for me (8.3.1)
Thanks!
Comment #101
hilrap CreditAttribution: hilrap commentedThank you!
#60 resolved "The Language Flag mapping entity type needs to be installed."
Comment #102
drupalfan2 CreditAttribution: drupalfan2 as a volunteer commentedI had this problem after updating from Drupal 8.3.2 to 8.3.3, but my fields contained already data.
Is there no simple way to update field storage and solve this mismatched entity error when there is already data in the fields?
Comment #103
maxilein CreditAttribution: maxilein commenteddrush entity-updates did work for me..
Comment #104
rvanderh1 CreditAttribution: rvanderh1 commented#60 also worked for me. Thank you!
Comment #105
FlutterStack CreditAttribution: FlutterStack commentedI had similar error when (refer status report Mantance.png image) When I updated my drupal from 8.3.3 to 8.3.7.
drush updatedb --entity-updates fixed for me.
Comment #106
zenimagine CreditAttribution: zenimagine commentedIs there an equivalent command with the console ?
Comment #107
frankcarvajalr CreditAttribution: frankcarvajalr commentedWilfred Waltman esta en lo correcto la forma de solucionar el inconveniente es con (drush entity-updates)
Comment #108
handkerchiefI updated from 8.3.7 to 8.4.0-rc2
Now i have this message:
So I tested all the options above, one for example:
drush entity-updates
result message after drush command:
but the error message remains, no matter how many times I run an update. any ideas?
Comment #109
lakenney CreditAttribution: lakenney commented@Nayis #63
Thank you! That worked for me. Drush commands didn't work.
Comment #110
handkerchieffor me this does not work. Also not with the devel-php-variant. As with the drush commands, it seems that it worked, but did not, the message does not disappear.
Comment #111
zenimagine CreditAttribution: zenimagine commentedwhat is the equivalent of this console command ?
Comment #112
lehoa85 CreditAttribution: lehoa85 commentedI had same issue #110 when upgrade to drupal 8.4.0 without fix by running drush entity-updates
How to fix it?
Comment #113
steveoriolSame as #110 ( after upgrade to drupal 8.4.0 and upgrade drush8 to drush9 to try "drush entup", without success)...
Comment #114
steveoriolComment #115
ronaldmulero CreditAttribution: ronaldmulero as a volunteer commenteddrush entity-updates
Worked for me.
Drupal core 8.4.0
Drush 8.1.14
Comment #116
handkerchiefstill no success with:
Drupal 8.4.0
Drush 8.1.12
Comment #117
steveoriol@ronaldmulero and @handkerchief,
How could you use Drush 8.x with Drupal 8.4
Normally you should use Drush 9.x for Drupal 8.3+, Drush 8.x is for Drupal 8.3-
See: http://docs.drush.org/en/master/install/#drupal-compatibility
Comment #118
handkerchief@steveoriol: I followed this description: https://www.drupal.org/project/drupal/releases/8.4.0
But I will try it with Drush 9.
Comment #119
handkerchiefStill no success with:
Drupal 8.4.0
Drush 9.0.0-beta6
Comment #120
ollioi CreditAttribution: ollioi commentedI got the same problem. After update to Drupal 8.4.0 the "Entity/field definitions Mismatch detected" message shows up.
Using drush (Version 8.1.13) entity-update runs without error message, but the message still appears. I've run the command several times with no success.
Comment #121
wolfthesad CreditAttribution: wolfthesad commentedSame problem here after upgrade to dupal 8.4.0. Drush 9 did not help either. After further investigation, I found out that that the contributed File entity module, which I had installed, was now mostly in drupal core, hu. A conflict between between the old contrib and the new core module? After uninstalling this module and running the php code from #24 everything got back to normal and the issue was no longer mentioned in Status report.
Comment #122
bander2 CreditAttribution: bander2 as a volunteer commentedSame problem after updating to Drupal 8.4.0. Tried drush 8.1.13 and 9.0-dev-g2852ef7. No luck.
Is there a manual way to fix this? How can I tell which field has the issue? I don't have a field called "File type".
Comment #123
gmaxwelled CreditAttribution: gmaxwelled commentedSame problem, and I also have File entity module installed. I don't think uninstalling this is an option for me though.
Comment #124
handkerchiefComment #125
cilefen CreditAttribution: cilefen commented@handkerchief Please open a new issue specifically for the file mismatch rather than reopen this epic. Thank you!
Comment #126
cilefen CreditAttribution: cilefen commented@handkerchief No need - there is such an issue.
Comment #127
Cheviot CreditAttribution: Cheviot as a volunteer commentedI use
drupal 8.4.0
Composer version 1.5.2
Drush 9.0-dev-g2f52b20
PHP 7.0.18
I cannot resolve a Drush entup, see below. Drush recommends uninstalling a publishing field. There is no such thing as uninstalling the publishing field for "custom block", how can this be resolved for "custom block" which is a core item?
see below:
The following updates are pending:
block_content entity type :
The Publishing status field needs to be uninstalled.
Do you wish to run all pending updates? (yes/no) [yes]:
> yes
[error] Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException: Unable to delete a field (status in block_content entity) with data that cannot be purged. in Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema->onFieldStorageDefinitionDelete() (line 428 of /library/webserver/documents/named/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php).
In the status report I see
Entity/field definitions
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Custom block
The Publishing status field needs to be uninstalled.
Comment #128
cilefen CreditAttribution: cilefen commented@Cheviot Please open a new issue for that.
Comment #129
liquidcms CreditAttribution: liquidcms commentedDuring module development i have gotten my test site into a state with numerous "Mismatched entity and/or field definitions". But these are due to various forms of corrupted fields. As with Drupal 7, Drupal 8 still has many poorly written routines which, upon any error, simply crash. Running drush entity-update or the script in #11 results in same error:
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal8.node__field_category' doesn't exist: UPDATE {node__field_category} SET deleted=:db_update_placeholder_0; Array ( [:db_update_placeholder_0] => 1 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->onFieldStorageDefinitionDelete() (line 1479 of E:\www\drupal8\core\lib\Drupal\Core\Entity\Sql\SqlContentEntityStorage.php).
which simply means field table was missing and the D8 db api can't handle this. As a result, none of the "API approaches" listed above are likely to work.
Most likely only method to truly clean out corrupted fields is to manually clean up the DB (or a better written script which removes individual field pieces in the DB. I am in the process of writing a module which will "force" delete fields. I'll post here when i have it working.
Comment #130
liquidcms CreditAttribution: liquidcms commentedTo continue with my plan from #129 i think pieces of a field are scattered through the db in:
- entire data (no longer called this in D8) and revision tables
- entire records in key_value, config and cachetags tables
- buried in serialized records in config and key_value tables
and the killer: binary records in the key_value tableI have no idea how to remove the reference to my corrupt field out of the binary data stored in key_value table so I would have to go out on a limb and suggest it is not possible to completely clean up corrupt fields in D8 (so easy in D7).not sure why phpmyadmin and navicat both could not display key_value record but it is simply a very large serialized value. Once that last part was removed from the array; the field no longer shows on status report.
Comment #131
Abdelhamid CreditAttribution: Abdelhamid commentedthanks to @Wilfred_Waltman I had the same error and "drush entity-updates" has fixed it for me :D
Comment #132
dark_kz CreditAttribution: dark_kz commenteddrush entity-updates didn't work for me.
My field type is field_collection
Comment #133
trentwyman CreditAttribution: trentwyman commentedThis contrib module was recently released that can run entity-update through the UI.
https://www.drupal.org/project/entity_update
Comment #134
MingsongEasy solution #60 works for me.
Thanks a lots.
Since this is a very common issue, I am wondering if it is possible to add the entity updating feature into the update.php?
In this way, a site builder just simply run the update.php without installing any contribute modules or coding need.
It is quite important for production environment in which we don't want to install Devel module and Drush or hack the core index.php file.
Comment #135
paperscenery CreditAttribution: paperscenery commentedAnother thumbs up for solution #60. Sağol @osman
Comment #136
rkchallengers CreditAttribution: rkchallengers commented#24 Worked for me. Thank you!
Comment #137
imanoop CreditAttribution: imanoop commentedFinally this is working for me #24 .
Added the code to the end of my Index.php and clean site cache and error is gone then remove that code from there.
Comment #138
Stephen Ollman#24 totally killed my site. Thank god I had a backup.
Comment #139
Anonymous (not verified) CreditAttribution: Anonymous commented#24 worked for me. Using Drupal core 8.5.5 on Pantheon. Thank you petiar!
Comment #140
ExTexan CreditAttribution: ExTexan commentedI tried the "drush entity-updates" method to fix this issue, but it didn't work for me.
In my case, the Status Report says: "The node.comment field needs to be uninstalled." ...but when I run "drush entity-updates", it says:
"Base table or view not found: 1146 Table 'node__comment' doesn't exist"
It is trying to update the deleted column in that table with "1".
Any suggestions on how to fix this? It seems my site is stuck between an update that it "thinks" needs to be run, and a non-existent table (because the comment module has been uninstalled).
Comment #141
maxilein CreditAttribution: maxilein commentedreinstall the comment module and try again...
Comment #142
ExTexan CreditAttribution: ExTexan commented@maxilein, Thanks for the suggestion. I had tried that already. I really thought that would fix it, but, alas, no.
Comment #143
maxilein CreditAttribution: maxilein commenteda similar situation with some other module has worked for me. Butit was not the comment module..
Comment #144
David Radcliffe CreditAttribution: David Radcliffe at Triplo commented(deleted)
Comment #145
Rick Hood CreditAttribution: Rick Hood commentedError seen on /admin/reports/status
Running
drush entup
returns this error:Doing this seems to get rid of the
drush entup
error:ALTER TABLE users DROP INDEX user_field__uuid__value;
I guess I need to do that on the live database. Don't ike it but will give it a shot.
Comment #146
Boldizart CreditAttribution: Boldizart commented#24 worked for me. Thanks. :)
Comment #147
GaëlGI had the "table doesn't exist" error for a field I had deleted (field_date), each time I tried to execute drush entup (same as #129 and #140).
This is how I fixed it:
Comment #148
miscdr CreditAttribution: miscdr commentedSolution #133 worked for me.
Thank you very much.
Comment #149
MartinMa CreditAttribution: MartinMa commentedJust had this problem more than a half year ago, and #24 solved it (as code on index.php).
But now I have on one site the problem again and #24 / #60 dont still work, on php console of devel module I get following error message:
Unfortunately I couldnt install drush on my server ...
Comment #150
lias CreditAttribution: lias commented#24 worked for me also - affected 8.6.1 upgrade with token 8x-1.5
Comment #151
gngn CreditAttribution: gngn at Computer Manufaktur GmbH commentedI solved the problem with the contrib module entity_update (mentioned in #133 by trentwyman) using the drush commands given at "Advanced use for complex updates" (i.e. with existing content).
Basically it:
Thanks!
Comment #152
tjtj CreditAttribution: tjtj commenteddrush entity-updates goes in a loop for me:
How does one fix this?
Comment #153
perkedel CreditAttribution: perkedel commentedHad this problem from 8.x-5.0-rc29 to 8.x-5.0-rc30.
No drush here, so I couldn't use that solution.
#11 Fixed it.
https://www.drupal.org/project/drupal/issues/2601762#comment-10743216
Comment #154
Anne-Pierre CreditAttribution: Anne-Pierre commentedThanks petiar, #24 worked for me.
Comment #155
karolus CreditAttribution: karolus as a volunteer commentedHad the same issue updating from 8.x-5.0-rc30 to 8.x-5.0.
@perkedel's suggestion (#153) fixed it for me.
Now, one question—why isn't this included in the update hook?
Comment #156
Lalith Manage CreditAttribution: Lalith Manage commented#24 worked for me after upgrading from Drupal Core 8.6.3 to 8.6.4.
petiar, thanks a bunch!
Comment #157
tjtj CreditAttribution: tjtj commented#24 kills my site.
#11 goes into a loop:
Comment #158
frederico CreditAttribution: frederico as a volunteer commented#24 Petiar, your solution works. Thank you!!! For reference, I have Drupal 8.6.4 and Webform 8.x-5.0.
Comment #159
william.jieh CreditAttribution: william.jieh commented#24 works for me! Thanks!
Comment #160
themic8 CreditAttribution: themic8 commented#24 didn't work for me. Error: Drupal\Core\Entity\EntityStorageException: The SQL storage cannot change the schema for an existing entity type
Core: 8.6.16
Comment #161
gngn CreditAttribution: gngn at Computer Manufaktur GmbH commented@themic8:
That's just the problem - drupal cannot change the schema if you have existing data.
Did you try the contrib module entity_update (mentioned in #133 and #151)?
That worked for me.
Comment #162
sharif.elshobkshy CreditAttribution: sharif.elshobkshy commentedDo not apply #24. It will run that snippet on every load page. It should only be run once.
Also, index.php or any other core file should not be manually changed.
Comment #163
ntaylor1994 CreditAttribution: ntaylor1994 commented#161 didnt work for me. This happened going from 8.6.15 to 8.7.0 and 8.7.1. Some tables in my DB are marked "old" and some of my pages return a 404, even though they were there before the upgrade. Is this a known bug in 8.7?
Comment #164
pritam.tiwari CreditAttribution: pritam.tiwari as a volunteer commentedNeither #11 nor #24 worked in my case.
I have done Drupal core update from version 8.5.7 to 8.7.1.
With drush entup command completes successful but the error in the admin back-end still persist.
Comment #165
cilefen CreditAttribution: cilefen commentedThere are changes in 8.7.0, which this comment explains: #3053637-2: Status report show Mismatched entity and/or field definitions after update to 8.7
Comment #166
jimafisk CreditAttribution: jimafisk at Jantcu commentedSame problem going from drupal/core (8.6.16 => 8.7.1).
The status report page ("/admin/reports/status") shows:
Running a
drush entup
shows:After typing "yes" drush says it completes successfully, but the updates are still pending.
After the 8.7 upgrade I can continue to access the "/user/login" URL and my logged in session continues to work, but anonymous traffic gets the following error:
Update: I was able to successfully run the entity updates via drush by adding the Devel Entity Updates module. The "entity:user context is required and not present" may be a separate issue, so moving that conversation here: https://www.drupal.org/project/drupal/issues/3057399
Comment #167
jjwfcd CreditAttribution: jjwfcd commentedwhen I run the drush entity-updates, it alert
The SQL storage cannot change the schema for an existing field (field_image in node entity) with data.
8.6.16
Comment #168
PepeMty CreditAttribution: PepeMty commentedI confirm that, as per the update of #166, devel_entity_updates worked for me.
Warm regards from sunny México.
José
Comment #169
vrwired CreditAttribution: vrwired commentedI can also confirm #166 is current solution.
Thanks for noting that discovery @jimafisk! Normally I skip to the end of issue queue to find latest solution and should have done so again in this case sooner than later.
It was just baffling that drush entup notified success even though had not yet installed the Devel Entity Updates module.
What a long standing issue this is, taking new turns as D8 evolves!
Comment #170
joonapenttila CreditAttribution: joonapenttila commentedI can confirm #166 works !
Comment #171
suparnaa.dey CreditAttribution: suparnaa.dey as a volunteer commented#166 works for me as well. Thanks @jimafisk
Comment #172
handkerchiefI tried #166 and I think it worked. Anyway, the update messages are gone.
Comment #173
codeyourdream CreditAttribution: codeyourdream commented#166 worked, thank you
Comment #174
andres.torres CreditAttribution: andres.torres commented+1 for #166. Thanks for the tip!
Comment #175
mano2003 CreditAttribution: mano2003 commented+1 for #166. Works for me, thanks!
Comment #176
glynster CreditAttribution: glynster commented+1 for #166. Once installed I could then run:
drush entity-updates
Problem resolved.
Comment #177
tjtj CreditAttribution: tjtj commentedignore this
Comment #178
Alen Simonyan CreditAttribution: Alen Simonyan as a volunteer commentedIf you have error like this - "The Adjustments field needs to be installed." you need to run
drush updb
Comment #179
siddiq CreditAttribution: siddiq commentedAutomatic entity update is not supported after 8.7. So I can't run
drush entity-updates
now. But still getting this error for multiple modules. Anyone came across this issue. My updated Drupal version is 8.8.5Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
File
Flagging
Taxonomy term
Comment #180
mario.elias CreditAttribution: mario.elias commentedCan anyone help with Mismatched entity and/or field definitions error"
I am using Drupal core 8.8.5 and Drush version : 9.7.2. I have the fallowing modules:
I get error running sql query updates;
drush sql:query "UPDATE paragraph.field_reusable_paragraph SET status = 0 WHERE status is NULL"
Thank you
Comment #181
BerdirCreate a new support issue in paragraphs or try #drupal-support on Slack or maybe Drupal answers, commenting on closed issues won't really get you any responses as most people don't even see that.
Comment #182
wavesailor CreditAttribution: wavesailor as a volunteer commentedSolution #133 worked for me.
Comment #183
PiRoth CreditAttribution: PiRoth commentedI had an error with FEEDS (node.feeds_item needs to be updated).
Solution #133 (using the Entity Update module) resoled the problem.
Comment #184
zakariabdc CreditAttribution: zakariabdc as a volunteer and commented#133 worked for me
I had this error at /admin/reports/status :
This module: https://www.drupal.org/project/entity_update solved the error.