- Issue created by @bata.laci
- Status changed to Postponed: needs info
over 1 year ago 6:48am 14 March 2023 - π³πΏNew Zealand wiifm Wellington, NZ
This is a little confusing. Are you doing a multi-site here (one site per domain)? Or using many domains attached to the one site (like using the https://www.drupal.org/project/domain β module)?
The first option should work. The second likely won't.
- Status changed to Needs work
over 1 year ago 3:05pm 18 April 2023 - First commit to issue fork.
- π¬π§United Kingdom omahm Belfast
I've done some initial work on this.
The changes are the addition of a select element from which to choose your Domain. From that the upload path will have the Domain id appended to it to ensure there is a unique favicons directory for each Domain. Config is stored on a per Domain basis, this allows for variations on tags etc. Requests to favicons are rerouted based on the current Domain to each unique favicon directory.Still some work to do on this but any thoughts are welcome.
- π³πΏNew Zealand wiifm Wellington, NZ
I do like the idea of a dropdown that only appears if the site is using the domain module. Perhaps there could be a form suffix (in the UI) added for the directory as well, to indicate the domain ID will be added, and there is no need craft a unique directory per domain.
I assume the domain ID is not considered sensitive in any way.
- π¬π§United Kingdom omahm Belfast
Yeah, the Domain dropdown only appears if you check the 'Enable Domain support for favicons' (see the attached file) and that checkbox only appears if the Domain module is installed. I made that optional as I figured some multi-domain installs will share the same favicons across all domains.
When you select a Domain, it appends the id onto the end of the 'Path to responsive favicon files' and that's the functionality that I'd really like some input into as it's only way I could get this to work without altering the module config schema.
The attached Gif animation is how I'd like to present the required sub-dir options, you can use the domain id or if that is undesirable, then a custom dir. To provide this I'd need to add some additional entries into the module schema.
- π³πΏNew Zealand wiifm Wellington, NZ
This seems rather complicated. I am unsure if the complexity is warranted either?
Perhaps
If the domain module is installed, then favicons will be looked for in the following directories (priority order):
- Existing "path to responsive favicons" + domain ID folder
- Existing "path to responsive favicons" + domain name folder
- Fallback to "path to responsive favicons"
The field description could be amended to make this clear.
Then you don't need any additional drop downs, or AJAX or anything. Also saves a bunch of configuration.
Thoughts?
- π¬π§United Kingdom omahm Belfast
The priority order is a good idea but I still think it'd be better to have the dropdown to select the Domain and the rational is that you'd need to log into each individual domain to save the config for each. Given that the dropdown will only appear if you have the Domain module installed I don't think it'll inconvenience the majority of users of this module.
- π³πΏNew Zealand wiifm Wellington, NZ
Yeah OK, let's give it a go. Keen to review the patch, once you have one up.
- πΊπ¦Ukraine stomusic Ukraine
Look like works good for my situation. I've converted it to patch for possibility to easy apply now