Drupal Core 8.4.4
Module Version 8.x-1.0-beta4 AND newest dev version

label1.png


label2.png

Comments

handkerchief created an issue. See original summary.

carwin’s picture

I had this same issue, and it looks like it's due to the jquery.simpler-select.js's selectGetLevel method hooking onto .form-type-cshs. The default templates (like classy) render forms with a prefixed "js" on that form type class like so: .js-form-type-cshs.

There should probably be a patch to this module to solve the issue, but since the maintenance seems like its halted, a quick workaround would be to add a custom form-element.html.twig template to your theme and add 'form-type-' ~ type|clean_class, to the classes array.

You can find the default template here.

handkerchief’s picture

@carwin Thank you very much!

It's sad that the modul maintenance is not really on point... because this module is pretty much the only one for drupal 8 with this (really basic) function. It's a shame...

plousia’s picture

Bit late, but just wanted to say thanks @carwin for this as well...fixed the problem for me.

heavystonehead’s picture

@ carwin thank you for sharing it... it works

br0ken’s picture

Status: Active » Closed (outdated)
StatusFileSize
new529.89 KB
new424.91 KB

Seems to be outdated.

andy-blum’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
Status: Closed (outdated) » Needs work
StatusFileSize
new137.09 KB

This is still an issue in Claro. I've been trying to track down where things are breaking and I haven't found it yet.

br0ken’s picture

Priority: Major » Normal

Oh wow! With Claro the first label persists across all combo boxes. 😲 Need to check the other core themes and see whether this could be a Claro-related issue only.

br0ken’s picture

Olivero has the same issue. Bartik is ok though. I bet the issue should be the same for Claro and Olivero.

br0ken’s picture

Classes on Claro:

js-form-item form-item js-form-type-cshs form-type--cshs js-form-item-field-tags-0-target-id form-item--field-tags-0-target-id form-item--no-label

Classes on Olivero:

js-form-item form-item js-form-type-cshs form-item-field-tags-0-target-id js-form-item-field-tags-0-target-id form-no-label

Classes on Bartik:

js-form-item form-item js-form-type-cshs form-type-cshs js-form-item-field-tags-0-target-id form-item-field-tags-0-target-id form-no-label

Classes on Seven:

js-form-item form-item js-form-type-cshs form-type-cshs js-form-item-field-tags-0-target-id form-item-field-tags-0-target-id form-no-label

CSHS's JavaScript logic uses .form-type-cshs and it does not exist for both Claro and Olivero themes which makes the #3173253: selectGetLevel() fails due to targetting .form-type-cshs not .js-form-type-cshs issue clear.

br0ken’s picture

Status: Fixed » Closed (fixed)

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