Problem: Updating Fences from 8.x-2.0-alpha1 to 8.x-2.0-alpha2 results in loss of Fences configuration and causes the site to display incorrectly. Rolling back to 8.x-2.0-alpha1 restores Fences markup and the site displays as designed.
In Drupal 8.7.5, both the Fences markup and classes are ignored.
In Drupal 8.7.7, the Fences markup is ignored and the classes are retained.
See attached images for code examples and comparison.
Thanks for this module, I use it in all my Drupal 7 and 8 projects.
If you need more information to help troubleshoot this issue, please let me know. I am not using Paragraphs, Display Suite, or Layout Builder.
Comments
Comment #2
mark_fullmerI can confirm the above behavior.
Comment #3
j.cowher commentedCould this be related? https://www.drupal.org/project/fences/issues/3018654
Comment #4
justcaldwellDoes your theme override field.html.twig? If so, you likely won't get the markup from Fences -- see #2572397: Allow themes to override the field template..
Comment #5
camhoward@j.cowher -- No, I don't believe my case is related to https://www.drupal.org/project/fences/issues/3018654 as neither site having this issue is using Layout Builder.
@justcaldwell -- No, neither site having this issue is overriding field.html.twig.
Thanks for the ideas on things to check!
Comment #6
sam152 commentedI do think this is probably theme related. What theme is your site using out of interest and does it extend any other theme?
Comment #7
camhoward@Sam152 -- Each site is using a sub-theme of AdaptiveTheme.
Each site's theme works fine with Fences 8.x-2.0-alpha1 and not with Fences 8.x-2.0-alpha2. The theme didn't change, only the version of Fences, so that's a puzzle.
I hope @mark_fullmer will let us know what theme he is using since he ran into the same issue.
Also, at the time I first reported this issue, the two sites were using Drupal 8.7.5 and 8.7.7. Both sites are now using Drupal 8.8.1 and the issue continues.
Comment #8
justcaldwell@camhoward your sub-theme may not have an explicit field template override, but AdaptiveTheme very likely does. That would be a good place to start investigating. As a quick test, maybe copy Fences' field.html.twig to your sub-theme, clear caches and see if the missing markup appears.
Good luck!
Comment #9
camhowardAh, of course. I forgot to check the parent theme!
Yes, @justcaldwell, you are quite right. AdaptiveTheme had overridden field.html.twig.
Once I followed your advice and copied Fences' field.html.twig to the respective sub-themes and cleared caches, Fences 8.x-2.0-alpha2 works fine in both sites.
Thanks for taking time to respond and point me in the right direction. I appreciate it!
Comment #10
camhowardSince this is a theme issue and not a Fences issue, it seems appropriate to close this as "works as designed."