If the theme is installed into themes folder without a subfolder contrib like
/themes/olivero
instead of
/themes/contrib/olivero

the theme logo has a wrong path and is not shown.

How can we repair this?

Comments

drupalfan2 created an issue. See original summary.

drupalfan2’s picture

Title: Theme logo has fix path » Theme logo has fixed path
mohit.bansal623’s picture

Status: Active » Needs review

This is working fine. I am not able to replicate this issue.
Actually this setting "Use the logo supplied by the theme" was not tick in theme settings. I ticked and the logo appears without any issue.

drupalfan2’s picture

The problem seems to be in debug.js file beginning on line 15:

      if (isChecked) {
        var logoHTML = "\n        <a href=\"/\" rel=\"home\" class=\"site-branding__logo\">\n          <img src=\"/themes/contrib/olivero/logo.svg\" alt=\"Home\">\n        </a>";

        if (currentLogo) {
          headerInner.removeChild(currentLogo);
        }

        headerInner.innerHTML = logoHTML + headerInner.innerHTML;
      } else if (currentLogo) {
        headerInner.removeChild(currentLogo);
      }
    }

In this line:
<img src=\"/themes/contrib/olivero/logo.svg\" alt=\"Home\">\n </a>";
there is a fixed path for the logo.

lokeshsahu’s picture

Status: Needs review » Active

There is a fixed path for the site logo in debug.js file. That makes the site logo hidden.

lokeshsahu’s picture

Assigned: Unassigned » lokeshsahu
lokeshsahu’s picture

StatusFileSize
new86.59 KB
new80.64 KB
new646 bytes

I have created a patch for the above issue and attached a screenshot for reference.
Please review.

lokeshsahu’s picture

Assigned: lokeshsahu » Unassigned
Status: Active » Needs review

I have created a patch for the above issue and attached a screenshot for reference.
Please review.

drupalfan2’s picture

Thank you.

But I think we need a different patch. Or even better it would be to change the path problem in dev Version of the Olivero theme.

We need a solution where any path will work, not only a fixed path. Themes can be installed to /themes oder /themes/contrib and any other location like /themes/mycategorie and other variants. Any other path is possible.

drupalfan2’s picture

Status: Needs review » Needs work
tushar_sachdeva’s picture

Assigned: Unassigned » tushar_sachdeva
tushar_sachdeva’s picture

We can try the path <img src="{{ directory }}/themename/logo.svg" alt="Home\" />,it will solved the path problem in dev Version of the Olivero theme.

tushar_sachdeva’s picture

Assigned: tushar_sachdeva » Unassigned
tushar_sachdeva’s picture

Assigned: Unassigned » tushar_sachdeva
tushar_sachdeva’s picture

Assigned: tushar_sachdeva » Unassigned
seutje’s picture

Status: Needs work » Closed (outdated)

This doesn't really seem relevant anymore since Olivero is in core. Feel free to re-open if I'm mistaken.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.