Problem/Motivation
In css/components/form.css there is:
form-required::after {
content: '';
vertical-align: super;
display: inline-block;
background-image: url(/themes/bootstrap_barrio/images/required.svg);
background-repeat: no-repeat;
background-size: 7px 7px;
width: 7px;
height: 7px;
margin: 0 0.3em;
}
Which on most systems probably works, but in our case we have a different folder structure.
Steps to reproduce
Change the folder structure for your themes and required.svg will create a 404 issue
Proposed resolution
Change the code to:
form-required::after {
content: '';
vertical-align: super;
display: inline-block;
background-image: url(../../images/required.svg);
background-repeat: no-repeat;
background-size: 7px 7px;
width: 7px;
height: 7px;
margin: 0 0.3em;
}
This creates a relative path to the existing path and then doesn't rely on the hard-coded folder structure. Maybe we need to check elsewhere to see if this is a similar situation.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | bootstrap-barrio-3375603-12.patch | 413 bytes | chike |
| #4 | 3375603-4.patch | 447 bytes | sidharth_soman |
Issue fork bootstrap_barrio-3375603
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:
- 3375603-required.svg
changes, plain diff MR !63
Comments
Comment #2
sidharth_soman commentedComment #3
sidharth_soman commentedWorking on this.
Comment #4
sidharth_soman commentedI've made the required changes against the 5.5.12 branch. Please review this patch
Comment #5
swatidhurandhar commentedThe above patch #4 works fine but I believe we need to change the path in scss file(form.scss) as well. The path to image folder is added in a variable in 'variable.scss' file, and variable is called in form.scss.
Comment #7
hatuhay commentedComment #11
chikeThis issue came back. I tried submitting a merge request but got confused in the process so here's the new fix:
The path in the 5.5.13 version of the module is
background-image: url(../../required.svg);So it needs to be changed again to,
background-image: url(../../images/required.svg);Comment #12
chikeI made a patch cos I need this in many sites.
Comment #14
chikeThis issue is gone in the current dev version so anyone having this issue can use the dev version till a new release comes.