Problem/Motivation
views fieldset labels do not render css when adding entity reference.
Steps to reproduce
Add View => /admin/structure/views/add then continue to add entity reference
Proposed resolution
Correct Views fieldset labels to render css when adding entity reference.
| Comment | File | Size | Author |
|---|---|---|---|
| views-entity-reference.JPG | 41.54 KB | sophron |
Issue fork drupal-3457768
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #5
misterdidi commentedAfter digging into the code, I found out that :
- Claro module moved its file responsible for the styling of tabs
css/components/views-ui.cssfrom global-styling library to a new one called views_ui which extends views/views.module library.- views/views.module is attached to any new ViewExecutable object through its $element property and used in the render array of
Drupal\views\Plugin\views\display\DisplayPluginBase::render().- for Entity Reference display, the display plugin
Drupal\views\Plugin\views\display\EntityReferenceoverrides its parent render() function and does not attach the view $element property to the render array. Hence, views/views.module is never attached and the claro/views_ui never used for an Entity Reference display.I wrote a patch in which I chose to alter the render() method of EntityReference to mimic DisplayPluginBase::render() and always return the view $element['#attached'] value with the render array.
I do not have the rights to create a MR, though.
Comment #6
misterdidi commentedComment #7
lolgm commentedI believe this issue is a part of #3444998: Secondary tabs design is distorted on block view page.
If it really is, I believe this is a duplicate.
Comment #8
smustgrave commented@misterdidi can you confirm if this is a duplicate? If not it should go back to Needs work though as will need an MR to review.
Comment #9
traviscarden commentedConfirmed: This is a duplicate of #3444998: Secondary tabs design is distorted on block view page. The problem there (
view-ui.cssis missing) is the cause here, too, and adding it fixes the problem in both cases.