Problem/Motivation

  1. Install standard
  2. Install configuration translation, language
  3. add a second language and make it the default
  4. Create a new node page view using fields.
  5. Save the view
  6. Translate the view, set a different label for the title field
  7. Save the translation
  8. Remove the title field and replace it with a NID field
  9. 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

Comments

dawehner created an issue. See original summary.

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new3.63 KB
new2.68 KB
dawehner’s picture

StatusFileSize
new3.64 KB
new0 bytes

Suggestion by alexpott

dawehner’s picture

StatusFileSize
new3.79 KB
new605 bytes

One more test case at least.

The last submitted patch, 2: 2750167-fail.patch, failed testing.

The last submitted patch, 3: 2750167-3.patch, failed testing.

alexpott credited willwh.

alexpott’s picture

alexpott’s picture

Priority: Major » Critical
Issue summary: View changes

Given 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.

alexpott’s picture

Version: 8.2.x-dev » 8.1.x-dev
Status: Needs review » Reviewed & tested by the community

This 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.

alexpott’s picture

  • catch committed b2b8aea on 8.2.x
    Issue #2750167 by dawehner, alexpott, willwh: Config translation...

  • catch committed a790e79 on 8.1.x
    Issue #2750167 by dawehner, alexpott, willwh: Config translation...
catch’s picture

Status: Reviewed & tested by the community » Fixed

This 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).

  • catch committed b2b8aea on 8.3.x
    Issue #2750167 by dawehner, alexpott, willwh: Config translation...

  • catch committed b2b8aea on 8.3.x
    Issue #2750167 by dawehner, alexpott, willwh: Config translation...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.