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.

Command icon 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

ShaneOnABike created an issue. See original summary.

sidharth_soman’s picture

Assigned: Unassigned » sidharth_soman
sidharth_soman’s picture

Working on this.

sidharth_soman’s picture

Assigned: sidharth_soman » Unassigned
Status: Active » Needs review
StatusFileSize
new447 bytes

I've made the required changes against the 5.5.12 branch. Please review this patch

swatidhurandhar’s picture

The 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.

hatuhay’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

chike made their first commit to this issue’s fork.

chike’s picture

This 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);

chike’s picture

StatusFileSize
new413 bytes

I made a patch cos I need this in many sites.

chike’s picture

This issue is gone in the current dev version so anyone having this issue can use the dev version till a new release comes.