Hi
When i'm reordering i can drag but not drop. I can only drop if I clck on the cross drag & drop icon.
In more, when I drop & save the order isn't saved.

Comments

Musa.thomas created an issue. See original summary.

dakwamine’s picture

#3268106: [META] Major update for display_fields provides a partial fix for this issue.

  1. Adding a field works.
  2. Deleting the field works.
  3. Moving the field disabled > enabled + save works.
  4. Moving the field in Field UI, field groups, etc + save works.
  5. Moving the field enabled > disabled + save does not work.

The partial fix fixes the region form widget of the display_fields field which caused a JS error in Field UI. But it did not fix the Moving the field enabled > disabled + save scenario. It looks like the region is not correctly set on the display field config on save.

The workaround is to edit the configuration files and import them.

Example for a field to disable

We need to edit two files, the view display config and the display field configured on this view mode:

root@xyz:/var/www/html/web# ../vendor/bin/drush cim
+------------+-----------------------------------------------------------------+-----------+
| Collection | Config                                                          | Operation |
+------------+-----------------------------------------------------------------+-----------+
|            | display_fields.display_fields_view.taxonomy_term.new_star.modal | Update    |
|            | core.entity_view_display.taxonomy_term.new_star.modal           | Update    |
+------------+-----------------------------------------------------------------+-----------+

In those files, we need to move the display_fields to the hidden section:

diff --git a/src/config/sync/core.entity_view_display.taxonomy_term.new_star.modal.yml b/src/config/sync/core.entity_view_display.taxonomy_term.new_star.modal.yml
index a0aaba50..9a6d32c3 100644
--- a/src/config/sync/core.entity_view_display.taxonomy_term.new_star.modal.yml
+++ b/src/config/sync/core.entity_view_display.taxonomy_term.new_star.modal.yml
@@ -41,7 +41,6 @@ third_party_settings:
     group_card_again:
       children:
         - field_image
-        - display_fields_clone__name
       parent_name: group_wrapper_description
       weight: 2
       format_type: html_element
@@ -170,4 +169,5 @@ content:
       field_formatter_class:
         class: ''
 hidden:
+  display_fields_clone__name: true
   langcode: true
diff --git a/src/config/sync/display_fields.display_fields_view.taxonomy_term.new_star.modal.yml b/src/config/sync/display_fields.display_fields_view.taxonomy_term.new_star.modal.yml
index 60d46fb4..4034c85d 100644
--- a/src/config/sync/display_fields.display_fields_view.taxonomy_term.new_star.modal.yml
+++ b/src/config/sync/display_fields.display_fields_view.taxonomy_term.new_star.modal.yml
@@ -10,13 +10,6 @@ targetEntityType: taxonomy_term
 bundle: new_star
 mode: modal
 content:
-  clone__name:
-    type: string
-    weight: '3'
-    settings: {  }
-    label: hidden
-    third_party_settings: {  }
-    region: content
   description:
     label: hidden
     type: text_default
@@ -32,6 +25,7 @@ content:
     third_party_settings: {  }
     region: content
 hidden:
+  clone__name: true
   field_call_to_action: true
   field_description_title: true
   field_image: true
delta’s picture

delta’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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