Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
This is the comeback of #2527816: Logic error in SqlContentEntityStorage::countFieldData() attempts to drop `name` column. Turns out, we forgot to do the same fix as we did there for dedicated field tables above.
And in a way, it is worse because we *actually* lose data. If you have a record in there for uid 0 (which shouldn't really happen but for some case I do have it at least in one table), then it just drops the table and re-creates it and your content is gone.
Proposed resolution
Apply the same check to the query as we have for the shared tables.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#10 | 2559309-10-interdiff.txt | 1.18 KB | Berdir |
#10 | 2559309-10.patch | 2.85 KB | Berdir |
#7 | 2559309-07.patch | 2.62 KB | jhedstrom |
#7 | 2559309-07-TEST-ONLY.patch | 1.66 KB | jhedstrom |
#2 | count-field-data-dedicated-ooops-2559309-1.patch | 990 bytes | Berdir |
Comments
Comment #2
BerdirComment #3
catchComment #4
jhedstromCan we add a test similar to the one in #2527816: Logic error in SqlContentEntityStorage::countFieldData() attempts to drop `name` column?
Comment #5
BerdirYes, that's exactly what we should do. Might get to do that in a few hours, will assign the issue to me then. If someone has time to look into this now, go for it!
Comment #6
jhedstromI'll work on the test.
Comment #7
jhedstromHere's a test.
Comment #9
BerdirI think we spent quite some time dropping entity_create() calls, let's switch to FieldStorageConfig::create() and so on.
Comment #10
BerdirUpdated that.
Comment #11
plachLooks good!
Comment #12
webchickAnd STAY fixed this time. ;)
Committed and pushed to 8.0.x. Thanks!