Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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).
Comment | File | Size | Author |
---|---|---|---|
#4 | adaptivetheme_form_node_form_alter-2269147-4.patch | 2.2 KB | nlambert |
Comments
Comment #1
nlambert CreditAttribution: nlambert commentedWrong project
Comment #2
Jeff Burnz CreditAttribution: Jeff Burnz commentedWell, 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.
Comment #3
nlambert CreditAttribution: nlambert commentedJust 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".
Comment #4
nlambert CreditAttribution: nlambert commentedHere's a patch for the latter.
Comment #5
Jeff Burnz CreditAttribution: Jeff Burnz commentedOK, so somewhere along the way this fixed itself, I can't reproduce it anymore, so hooray!