Different hyphens on fields after changing field templates

Created on 13 February 2021, almost 4 years ago
Updated 28 December 2023, 12 months ago

Problem/Motivation

I'm having an issue with different output of hyphens on the frontend when using Display Suite and Field Templates.

Steps to reproduce

Take the following steps to reproduce this behavior:

  • Install Display Suite
  • Enable Field Templates. I use Minimal as Default Field Template
  • Create a field. The output will be field--name-field-[fieldname].
  • Change the field to Reset with for example field item as 'h2' and save.
  • Change the field back to minimal and save.

Notice the change in the markup! Now the output will be field-name-field-[fieldname]. There is no way to recreate the old markup.

Check the screenshots: in the backend the fields are equal but they are rendered differently on the frontend. This has caused headaches for us: in some cases I had to rewrite big parts of my CSS code, only changing one hyphen!

Proposed resolution

If this could be fixed with a template, that would already be fine. I would propose field-- for all the fields, like the core output.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Field UI

Created by

🇧🇪Belgium bramvandenbulcke

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024