On the "Manage Display" page for any entity that has DS enabled the cogwheel in the operations section will not display for particular fields (plain textfield, etc). This is a problem when you have the fences module enabled as every field should now have the option to configure the field wrapper elements from the UI.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

droath created an issue. See original summary.

droath’s picture

ndf’s picture

  1. +++ b/includes/field_ui.inc
    @@ -4,7 +4,6 @@
    -
    
    @@ -849,7 +848,7 @@ function _ds_field_ui_table_layouts_preview(&$form, FormStateInterface $form_sta
    -    $form['ds_layouts']['layout']['#description'] = t("A layout must be selected to enable Display Suite functionality.");
    +    $form['ds_layouts']['layout']['#description'] = t('A layout must be selected to enable Display Suite functionality.');
    
    @@ -1371,5 +1369,6 @@ function _ds_sort_fields($a, $subkey) {
    +
    

    Can be removed from the patch

  2. +++ b/includes/field_ui.inc
    @@ -1258,7 +1257,6 @@ function _ds_field_ui_core_fields(&$form, FormStateInterface $form_state) {
    -        $table[$key]['settings_edit'] = array();
    

    Does this need a test to prove?
    nit: array() must be []

    But now you remove this. Won't it break something else?

droath’s picture

@ndf

I've removed the unnecessary code changes in the patch. As my editor was trying to be smart and update code to follow the PSR-2 standards.

I don't know if a test is needed for this patch. The field UI module is the one that should be defining the field settings_edit key for us. The DS module should be altering those fields in the _ds_field_ui_core_fields() function. Right now it's trumping the settings edit values that were defined by field UI. I could add a condition that would check to ensure that settings_edit key exists, if it doesn't then I can create an empty array. Although I don't think that code is necessary.

if (!isset($table[$key]['settings_edit'])) {
  $table[$key]['settings_edit'] = array();
}

Field UI Reference: Drupal\field_ui\Form\EntityDisplayFormBase::buildFieldRow() line: 386.

Status: Needs review » Needs work

droath’s picture

Status: Needs work » Needs review
FileSize
603 bytes
droath’s picture

Jonah Fenn’s picture

This patch cleared the issue up for me. Thanks!

aspilicious’s picture

Status: Needs review » Needs work

"I could add a condition that would check to ensure that settings_edit key exists, if it doesn't then I can create an empty array. Although I don't think that code is necessary."
Yeas could add the additional check.

And this needs a test to ensure we don't break this again in the future.

If you don't know how to create a patch or if you don't have the time, please tell me.
But any help is welcome... My time is limited :)

aspilicious’s picture

Issue tags: +drupalmountaincamp

  • aspilicious committed e67b2b8 on 8.x-2.x authored by droath
    Issue #2784581 by droath, ndf, fenns: Manage display operations are not...

  • aspilicious committed 8252bbb on 8.x-3.x authored by droath
    Issue #2784581 by droath, ndf, fenns: Manage display operations are not...
aspilicious’s picture

Status: Needs work » Fixed

I thought about this some more, you're right about a test being overkill.

Status: Fixed » Closed (fixed)

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

darren.fisher’s picture

Ran in to this issue today. Confirming that #8 is working for me with latest stable releases of Display Suite and Fences. Many thanks for the solution.