In at_core, adaptivetheme_form_node_form_alter adds "-form" to the end of classes beginning with "field-type-" or "field-name-".

Unfortunately this breaks the "Display/Hide summary" functionality of core modules/field/modules/text/text.js. The javascript is looking for "div.field-type-text-with-summary" without "-form" suffix.

This requires displaying the node add/edit form in at_subtheme or at_admin and having a text with summary field (like the default body field).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nlambert’s picture

Project: AT Panels Everywhere » AdaptiveTheme
Component: Code » CSS/HTML

Wrong project

Jeff Burnz’s picture

Well, the original reason why this was done comes from this: #1245218: Field styling bleeds into node edit forms

A condition could be put into adaptivetheme_form_node_form_alter() so it does not modify field-type-text-with-summary. The more commonly affected field type is image, although all can be adversely affected by bleeding front end styles.

nlambert’s picture

Just thinking out loud: What about a new theme setting for those who want this? Of course, a help text should read "will break display/hide summary functionality". Or a secondary option "add also text with summary fields" and the help text would be added to that.

Or maybe this should be left out of at_core and put into at_subtheme (commented like the rest)? As at_core says "You do not need to enable this theme. Use the provided AT Subtheme to get started".

nlambert’s picture

Here's a patch for the latter.

Jeff Burnz’s picture

Status: Active » Fixed

OK, so somewhere along the way this fixed itself, I can't reproduce it anymore, so hooray!

Status: Fixed » Closed (fixed)

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