Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
For example, if you visit the "Appearance" page (admin/appearance), the icon on the toolbar for this menu looks to not be present, but instead has the same colour as the toolbar.
Looking at the css, this will only occur for site run in a sub directly (or in my case locally). The css for these images is:
background-image: url(/core/themes/stable/images/core/icons/787878/file.svg);
But when you run a site in a folder, such as "my-site", the path would then need to be
/my-site/core/themes/stable/images/core/icons/787878/file.svg
Comment | File | Size | Author |
---|---|---|---|
#6 | adminimal_theme-css-absolute-urls.patch | 2.61 KB | tobia |
Comments
Comment #2
iancawthorne CreditAttribution: iancawthorne commentedComment #3
ArturY CreditAttribution: ArturY as a volunteer commentedHi,
I've made investigation with toolbar submenu links, right now when you select submenu category, active submenu link do not shown as selected and at first look you don't know what category is opened(active), seems to me it's barely intuitive.
I've figured out this issue the way I see it more appropriate for understanding menu navigation structure.
Please check out my improvement.
Thanks.
Comment #4
ozinComment #5
tobia CreditAttribution: tobia commentedI don't think ArturY's patch addresses this issue.
The problem is simply that
adminimal.css
contains some absolute paths:url(/*)
which is a big NO-NO in themes, because they break on websites that are not installed in the domain root.In this case, it's enough to change all 8 instances of
url(/core/
intourl(../../../core/
Comment #6
tobia CreditAttribution: tobia commentedComment #7
ANDiTKO CreditAttribution: ANDiTKO as a volunteer commented@tobia Thanks for the patch and you help!
But what about if the theme is installed in another directory, not in "/themes/adminimal_theme"? like "/sites/mycool_website/themes/adminimal_theme" ...
Comment #8
andrey.troeglazov CreditAttribution: andrey.troeglazov at DrupalJedi commentedComment #9
bskibinskiI think the problem here is not the adminimal theming, but the Drupal site setup of iancawthorne.
/core should always be in the root directory of your site install, I think a lot of modules and themes in drupal 8 are depending on that path structure.
You can have multi-site installs in the /sites directory, but drupal's root should always contain the /core folder. (default 'drupal8 composer install' puts the /core inside the /web folder, so web is your drupal root path.)
I don't think we can fix this issue for every path, without adding multiple fallbacks, and that could bring other unexpected issues, because you would look for images outside of drupal's path for most users.
Did you try the adminimal admin toolbar module? I think this will fix your issue, because it has its own icon with a relative path from the module.
Also, adminimal theme supports overriding theming, so you could fix the path's in your own install. But if you're using version control, I would recommend creating a new subtheme with adminimal as your base theme, and put the fix in there. (don't forget to make the new subtheme de default admin theme).