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

Favicon in backend causes usability glitches #958

Closed
kikmedia opened this issue Jul 12, 2017 · 22 comments
Closed

Favicon in backend causes usability glitches #958

kikmedia opened this issue Jul 12, 2017 · 22 comments
Assignees
Labels
Milestone

Comments

@kikmedia
Copy link

In b311944 a separate icon for the backend was introduced which causes usability glitches.

I am completely fine with an option showing a backend icon, showing love and prideness for Contao, BUT since I often work in multiple backends at the same time, the community forums are open at the same time in browser and still the Contao project page is open more or less generally AND they all use the same icon now, I just find this not only confusing but annoying.

Shouldn't this be configurable?

@fritzmg
Copy link
Contributor

fritzmg commented Jul 12, 2017

I agree, I also get confused now while having the community forums and multiple contao backends open within the same browser window.

@leofeyer leofeyer added the bug label Jul 12, 2017
@leofeyer leofeyer added this to the 4.4.2 milestone Jul 12, 2017
@agoat
Copy link
Contributor

agoat commented Jul 13, 2017

Shouldn't this be configurable?

You can simply change the be_main.html5 template (change/delete the favicon link)

Just an idea: Make the contao favicon for the backend without color (a grey icon)?!

@fritzmg
Copy link
Contributor

fritzmg commented Jul 13, 2017

You can simply change the be_main.html5 template (change/delete the favicon link)

You would have to override the complete be_main.html5 template just for this one line. A template block could be introduced for the favicon.

  <?php $this->block('favicon'); ?>
    <link rel="icon" type="image/png" href="<?= TL_ASSETS_URL ?>bundles/contaocore/favicon.ico">
  <?php $this->endblock(); ?>

Just an idea: Make the contao favicon for the backend without color (a grey icon)?!

Yeah, I'd like that too - but also make it configurable (either via a setting or via a template block).

@agoat
Copy link
Contributor

agoat commented Jul 13, 2017

You would have to override the complete be_main.html5

Why the 'complete' template? Just the favicon line..

@fritzmg
Copy link
Contributor

fritzmg commented Jul 13, 2017

Why the 'complete' template? Just the favicon line..

No, you have to override the complete template, because there are no template blocks defined. With template blocks your own be_main.html5 template could look like this:

<?php $this->extend('be_main'); ?>

<?php $this->block('favicon'); ?>
  <link rel="icon" type="image/png" href="<?= TL_ASSETS_URL ?>path/to/your/favicon.ico">
<?php $this->endblock(); ?>

@agoat
Copy link
Contributor

agoat commented Jul 13, 2017

With template blocks your own be_main.html5 template could look like this

Can I extend the same template (name) itself? I know the way to extend the 'block_searchable' a.s.o. but never extended the origin template itself without changing the name.

@fritzmg
Copy link
Contributor

fritzmg commented Jul 13, 2017

Yes, you can do that (but only in the /templates folder). This is the recommended way of changing the fe_page template too.

@agoat
Copy link
Contributor

agoat commented Jul 13, 2017

You never stop learning..

This is the recommended way of changing the fe_page template too.

Is there a source for recommendation?
In general I make a copy (by simply creating a template from fe_page in the contao template editor), rename it and make my changes. In the layout I select then the changed fe_page template.

@fritzmg
Copy link
Contributor

fritzmg commented Jul 13, 2017

It is inherently recommended ;). If you don't have to override a template completely, you won't miss out on any updates to the parent template.

Another example: if you want to add additional meta tags to the <head> in your fe_page, then your fe_page.html5 could look like this:

<?php $this->extend('fe_page'); ?>

<?php $this->block('meta'); ?>
  <?php $this->parent(); ?>
  <meta name="og:type" content="website">
<?php $this->endblock(); ?>

Also you don't need to specifically select the changed template, if the name is the same as the original.

@leofeyer leofeyer self-assigned this Jul 13, 2017
@leofeyer
Copy link
Member

Removed in ad7b624.

@agoat
Copy link
Contributor

agoat commented Jul 13, 2017

Removed in ad7b624.

Why not using a different favicon?

@kikmedia
Copy link
Author

Why not using a different favicon?

Because three backends mean that there will be three lookalike favicons, which is in fact not useful. You should be able to control this behaviour, setting individual icons. After removing the code, you are able to do so by simply placing an icon at root level and putting another icon for the frontend into your layout.

@agoat
Copy link
Contributor

agoat commented Jul 16, 2017

After removing the code, you are able to do so by simply placing an icon at root level and putting another icon for the frontend into your layout.

Ok. I understand. IMO that looks like the easiest way to do.
A config setting for a backend favicon is somehow too much. Maybe the be_main.html5 template separeted in blocks will bring some advantage to this.

agoat pushed a commit to agoat/contao-core-bundle that referenced this issue Aug 1, 2017
@fritzmg
Copy link
Contributor

fritzmg commented Dec 8, 2017

It seems the orange favicon has been re-added in Contao 4.5-beta3 (Managed Edition). Was this done deliberately?

@Aybee
Copy link
Contributor

Aybee commented Dec 9, 2017

Why not simply add a favicon.ico to the root? There has to be no code in the HEAD.

A year ago I created a pull request to https://github.com/Ma3xl3/Contao-EasyFavicon. When this will get merged everyone who uses EasyFavicon can easily add the chosen favicon for FE also to the BE by activating a checkbox.

@leofeyer
Copy link
Member

leofeyer commented Dec 9, 2017

It seems the favicon has been re-added Contao 4.5-beta3 (Managed Edition).

@fritzmg What exactly do you mean?

@fritzmg
Copy link
Contributor

fritzmg commented Dec 9, 2017

@fritzmg What exactly do you mean?

Execute

composer create-project contao/managed-edition … 4.5-beta3

There will be a web/favicon.ico (the orange Contao logo), which is then automatically visible in the front and back end.

It has been added here: contao/manager-bundle@aa4e4e4

@leofeyer
Copy link
Member

leofeyer commented Dec 9, 2017

That's fine. The issue in this ticket was a different one.

@fritzmg
Copy link
Contributor

fritzmg commented Dec 9, 2017

Yeah I realize that now. But still, do we want to have this? Now I have to delete it with every new Contao installation. It's only a minor nuissance, but still.

@fritzmg
Copy link
Contributor

fritzmg commented Dec 10, 2017

Deleting the web/favicon.ico doesn't work, it's added with every composer operation.

> Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication

 Added/updated the web/app.php file.
 Added/updated the web/app_dev.php file.
 Added/updated the web/favicon.ico file.

Instead, one has to replace it with another favicon.ico.

@dmolineus
Copy link
Contributor

dmolineus commented Dec 10, 2017

If I understand the code right after a first short look, the favicon is only added of none exists. Same for the .htaccess file. So you're forced now to add a custom one of you don't want to see the Contao icon.

That's fine with me

@fritzmg
Copy link
Contributor

fritzmg commented Dec 10, 2017

If I understand the code right after a first short look, the favicon is only added of none exists. Same for the .htaccess file. So you're forced now to add a custom one of you don't want to see the Contao icon.

Yes, that's why I wrote

Instead, one has to replace it with another favicon.ico.

However, that's still a little annoying. Implementing the favicon isn't usually the first thing that happens during the development of a website - and if you don't do that, then you got the original problem of this ticket.

So if there's got to be a default favicon.ico, can it at least be the grey one from #963 so that we can distinguish between developing Contao sites and contao.org at a glance again?

@leofeyer leofeyer modified the milestones: 4.4.2, 4.4 May 14, 2019
leofeyer added a commit that referenced this issue May 5, 2020
Description
-----------

| Q                | A
| -----------------| ---
| Fixed issues     | Fixes #958
| Docs PR or issue | -

<!--
Bugfixes should be based on the 4.4 or 4.9 branch and features on the master
branch. Select the correct branch in the "base:" drop-down menu above.

Replace this notice with a short README for your feature/bugfix. This will help
people to understand your PR and can be used as a start for the documentation.
-->

Commits
-------

6b398b20 Set "information_schema_stats_expiry=0" in MySQL 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants