I have noticed that when you have editable fields displayed on the full view of your node, and you are using Display Suite for it, the editable fields inherit the layout from Renderable Elements since they are inside a form.

Right now there is not way (at least I didn't find it) to specify a layout for the node form and another layout for the editable field. Also the link "Manage form display" is displayed all the time on the editable field and when you click it you get nothing in the popup window.

Maybe if setting a different layout for editable fields is too complicated you at least could stop this layout propagation.

Thanks a lot.

CommentFileSizeAuthor
#7 1649498-7.patch889 bytesswentel

Comments

johaziel’s picture

Project: Renderable elements » Display Suite
Version: 7.x-1.0-alpha1 » 7.x-2.0

I get same bug but without using Renderable elements

I found that is ds_forms_form_alter who does this bug

so i changed the function like this, and that works for me but may be there is a better way to do that

function ds_forms_form_alter(&$form, &$form_state, $form_id) {
  
  if ($ds_form = ds_build_load($form, $form_id)) {
    if (!preg_match('/^editablefields_form_/', $form_id)) {
      if ($layout = ds_get_layout($ds_form->entity_type, $ds_form->bundle, 'form', FALSE)) {
        // Add the theming function and add the layout as a class.
        $form['#theme'] = array('ds_forms_custom_form');
        $class = strtr($layout['layout'], '_', '-');
        if ((isset($form['#attributes']['class']) && is_array($form['#attributes']['class'])) || !(isset($form['#attributes']['class']))) {
          $form['#attributes']['class'][] = $class;
        }
        elseif (isset($form['#attributes']['class']) && is_string($form['#attributes']['class'])) {
          $form['#attributes']['class'] .= ' ' . $class . ' ';
        }
      }
    }
  }
}
swentel’s picture

Status: Active » Closed (won't fix)

I'm not supporting Renderable elements anymore, that module is just to freaking complicated to get right.

johaziel’s picture

Status: Closed (won't fix) » Active

It's not about Renderable elements !!

I get same bug but without using Renderable elements

manuelBS’s picture

I have the same Problem in editable field forms, without renderable elements.

swentel’s picture

Status: Active » Postponed (maintainer needs more info)

From which module is this btw ?

manuelBS’s picture

Just using ds_forms and editable fields modules

swentel’s picture

Status: Postponed (maintainer needs more info) » Fixed
StatusFileSize
new889 bytes

Hmm, it's a pity there isn't something extra on the form or form_state but oh well. Committed a fix.

swentel’s picture

Status: Fixed » Closed (fixed)