Problem/Motivation
- Install standard
- Install configuration translation, language
- add a second language and make it the default
- Create a new node page view using fields.
- Save the view
- Translate the view, set a different label for the title field
- Save the translation
- Remove the title field and replace it with a NID field
- Goto the translated page view:
This also causes:
Field translations are not being removed from the config table when a field is removed from a view.
To reproduce, add a field to a view. Create a translation of this field. Now remove the field from the view.
If you then `select * from config where name = 'views.view.yourview' - you'll see the translations for the field you have removed still exist in config, for languages where the field has been translated.
In my example view, it's using a table layout, and I have additional columns in the table, from the old translation data, that should not exist.
From the duplicate issue #2774789: Field translations not removed from views config when deleting a field
Expected behaviour
It works, no translation though for the field
Actual
( ! ) Fatal error: Unsupported operand types in core/modules/views/src/Plugin/views/field/FieldPluginBase.php on line 1161
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | interdiff.txt | 605 bytes | dawehner |
| #4 | 2750167-4.patch | 3.79 KB | dawehner |
| #3 | interdiff.txt | 0 bytes | dawehner |
| #3 | 2750167-3.patch | 3.64 KB | dawehner |
| #2 | 2750167-fail.patch | 2.68 KB | dawehner |
Comments
Comment #2
dawehnerComment #3
dawehnerSuggestion by alexpott
Comment #4
dawehnerOne more test case at least.
Comment #8
alexpottComment #9
alexpottGiven that this also causes #2774789: Field translations not removed from views config when deleting a field I think this is a critical data integrity issue.
Comment #10
alexpottThis is a critical bug that will only get worse the longer we leave it. I think we should commit this and file a followup to address the upgrade path because it is likely to be extremely tricky.
Comment #11
alexpottMaybe the upgrade path is going to be important... #2669084: PHP Fatal error: Unsupported operand types in views FieldPluginBase.php on line 1168
Comment #14
catchThis looks fine to me - very straightforward fix, tricky bug though.
Committed/pushed to 8.2.x and cherry-picked to 8.1.x. Thanks!
Opened #2776357: Upgrade path for Config translation synchronization failure for the upgrade path (as a critical for now).