silverstripe/silverstripe-blog

Categories and Tags dropdown styles broken on SS 4.3

robbieaverill opened this issue · 7 comments

Versions

  • silverstripe/cms: 4.3.x-dev
  • silverstripe/blog: 3.2.x-dev
  • silverstripe/tagfield: 2.2.x-dev (React rewrite version)

Blog -> Post Options:

image

This is caused by some SCSS in the admin module which is being applied to the .tag selector - pretty broad: https://github.com/silverstripe/silverstripe-admin/blob/1/client/src/components/Tag/Tag.scss#L1-L12

I really can't work out why these two fields get the "tag" class added to them... =/

Ok I've narrowed it down to a cache state leak in ViewableData::objCache. There must be something earlier in the page (e.g. the search form in site tree) that is caching "tag" in the extraClass. I'm having a look through the framework PRs relating to static caching in 4.3 to see if one of them may have caused this.

The good news is that this is reproducible with only tagfield in a vanilla SilverStripe 4.3 installation

Ok, weird. This is caused by the default FormField::Type() value returning the classname without Field in it:

https://github.com/silverstripe/silverstripe-framework/blob/4.3.0-rc1/src/Forms/FormField.php#L1273-L1288

Perhaps we removed Type() from TagField at some point so now it's adding this class

Also note that the .tag CSS conflicts have been fixed upstream in the admin module too