The settings for paragraphs translation are not respected

Created on 4 December 2023, 7 months ago
Updated 7 December 2023, 7 months ago

Problem/Motivation

As paragraph entities are referenced with entity reference revisions field type, the translation settings of the field should be respected. Normally the fields of this type do not support translation, but there are contrib modules, that allow to have translations for such fields. Therefor it is important to check whether it is possible to delete, add, move paragraphs if at the moment the translation is loaded.

Steps to reproduce

  1. Create 1 paragraph type and make it translatable.
  2. Create content type page with at least 1 paragraph reference field.
  3. Make this content type translatable, keep the paragraph reference field not translatable as recommended by paragraphs module.
  4. Create page in default language.
  5. Create translation.
  6. Check the frontend_editing links for default language.
  7. Check the frontend_editing links for translation, they are the same, so it is possible to move paragraphs in translation and also to add new paragraphs.

Also the "Delete" paragraph button is displayed in the form, even if translation is loaded. The button appearance also should be dependent on paragraph parent field translation setting, because at the moment "Delete" removes paragraph from source entity as well even if translation is disabled for the reference field.

Proposed resolution

For move "up"/"down" and "add before/after" links check whether the parent entity field that references this paragraph is translatable or not. Check access to "Delete" button and operation for translation as well.

Remaining tasks

Create MR

User interface changes

Less links for paragraph actions in translations if translation is not allowed for parent field that references paragraphs

API changes

None

Data model changes

None

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany a.dmitriiev

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024