Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user.ico so favicon.ico gets not overwritten #17629

Closed
jjsjjs opened this issue Aug 20, 2017 · 16 comments
Closed

user.ico so favicon.ico gets not overwritten #17629

jjsjjs opened this issue Aug 20, 2017 · 16 comments

Comments

@jjsjjs
Copy link

jjsjjs commented Aug 20, 2017

Steps to reproduce the issue

Use the standard templates, update Joomla

Expected result

your favicon is gone

Actual result

The Joomla favicon is displayed instead of your own

System information (as much as possible)

Every version of Joomla

Additional comments

Is it possible to create a user.ico so the favicon is not getting overwritten every time there is an update?
This is happening when you make use of protostar or beez template. It's most annoying and easily forgotten to copy again and again and again. Thanks!

@brianteeman
Copy link
Contributor

No its not possible as favicon is an internet standard

The only option is to use a copy of the default template

@jjsjjs
Copy link
Author

jjsjjs commented Aug 20, 2017

You could leave it out of every update, and only put it in when a big update (read new Joomla version) is there. Updating the favicon every time is not bringing anything, but hassle for every Joomla user who uses the standard (and mostly adjusted) templates.

@brianteeman
Copy link
Contributor

Re-opening

That might be possible.

@brianteeman brianteeman reopened this Aug 20, 2017
@jjsjjs
Copy link
Author

jjsjjs commented Aug 20, 2017

Would be great, thank you.

@C-Lodder
Copy link
Member

Then the same would go for all the LESS files too. If you want to customize the default Protostar template, you should copy it. Same applies if you want to change the favicon

@jjsjjs
Copy link
Author

jjsjjs commented Aug 20, 2017

Maybe that's true. I don't know if the LESS files are also altered as much as the template.css, which has support for user.css

@mbabker
Copy link
Contributor

mbabker commented Aug 20, 2017

The right way to do things if you are going to use the core templates is to duplicate them. We can not (and should not) pick and choose which files are "important" for an update and which files are "important" to not override because a user might have made some changes. So it is an all or nothing agreement.

@brianteeman
Copy link
Contributor

Closing

@jjsjjs
Copy link
Author

jjsjjs commented Aug 20, 2017

ok fair enough. Thanks.

@Bakual
Copy link
Contributor

Bakual commented Aug 20, 2017

From memory, if you put a favicon into the root directory of your Joomla, the one from the template folder gets "overriden" and the one in root will be used.

@mbabker
Copy link
Contributor

mbabker commented Aug 20, 2017

Well, close. If one doesn't exist in the template and one exists at the root, that will be used.

// Try to find a favicon by checking the template and root folder
$icon = '/favicon.ico';
foreach (array($directory, JPATH_BASE) as $dir)
{
if (file_exists($dir . $icon))
{
$path = str_replace(JPATH_BASE, '', $dir);
$path = str_replace('\\', '/', $path);
$this->addFavicon(Uri::base(true) . $path . $icon);
break;
}
}

@jjsjjs
Copy link
Author

jjsjjs commented Aug 21, 2017

Well that would be the same as overwriting the existing favicon, only now delete the one in in the template directory. So copying the template directory and rename would then still be the best option in this case.

@Bakual
Copy link
Contributor

Bakual commented Aug 22, 2017

@mbabker Do you think we can change that order in J4? Because imho it makes more sense the other way around. Especially since we don't ship a favicon anymore in the root (I think there used to be one in earlier releases).
I doubt the default favicon we (or a template developer) ship is appropriate in most cases.

@mbabker
Copy link
Contributor

mbabker commented Aug 22, 2017

Feel free to propose a PR.

@Bakual
Copy link
Contributor

Bakual commented Aug 22, 2017

Done: #17677

@jjsjjs
Copy link
Author

jjsjjs commented Aug 22, 2017

Thanks a lot for this constructive discussion and the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants