getgrav / grav-premium-issues

Official Grav Premium Issues repository to report problems or ask questions regarding the Premium products offered.
https://getgrav.org/premium
7 stars 2 forks source link

[typhoon] Header Bar Custom Logo Incorrect logo served under some conditions #401

Open markwtt opened 11 months ago

markwtt commented 11 months ago

Using theme cloned from Typhoon theme v1.0.11 The master Typhoon theme itself now shows v2.4.3 Grav itself and all plugins are up to date.

Issue is that the logo chosen in theme Header Bar Defaults is served correctly when site is accessed using https://www.domainname but if accessed with https://domainname the file "Artboard 1.png" is served, all other images on the site seem to work fine with either url.

It is a while since I did much with grav and wanting to get back up to speed, but don't know where to start with this one...

Here is a screen capture showing the different results from the two urls.

assets-path-issue

Any assistance on where to start would be much appreciated.

thanks Mark

rhukster commented 10 months ago

Sorry @markwtt totally missed this issue of yours. What you are describing is the kind of thing that can happen i you have an env/domainname folder to environmental specific configuration:

https://learn.getgrav.org/17/advanced/environment-config

When you are in the admin for and the URL has the domainname in it and it matches a folder in env/, any changes or modifications will save into that env/domainname/config/... folder. however, when you visit www.domainname, and there is no specific env/ folder for it, then it falls back to the next config file which would be in the user/config/... folder. I suspect the difference in configuration is caused by this.

2 options:

  1. In the webserver (.htaccess etc) configuration any www.domainname.com URLs to simply redirect to domainname.com
  2. Remove the env/domainname folder and if you still need some form of configuration differences for different hosts (localhost etc) then just create a env/localhost folder and put any specific overrides there. That way the default for all other hosts (including domainname.com and www.domainname.com) will simply use the user/config/... folder