Favicon not working for child pages

447 views
Skip to first unread message

area...@atlassian.com

unread,
Aug 19, 2015, 2:43:31 AM8/19/15
to Scroll Viewport Developers
Favicons are not working for third level pages.

Description of issue:

Home page = working
Child of home page (second level page) = working
Child of second level page (third level page) = not working

Roman Serazhiev (K15t Software)

unread,
Aug 19, 2015, 5:28:53 AM8/19/15
to Scroll Viewport Developers
Hi Alexander,

Unfortunately we couldn't reproduce the issue with favicons. We have also checked http://developer.atlassian.com and pages 3 levels deep have favicons. For example: https://developer.atlassian.com/confdev/development-resources/preparing-for-confluence-5-2/migrating-to-atlassian-plugin-framework-3.

Therefore, could you please check:
  • if there is anything special you are doing regarding favicons in your template
  • it could be a browser caching issue. Could you try clearing the cache and then reproducing the issue again?
Cheers,
Roman.

area...@atlassian.com

unread,
Sep 10, 2015, 2:26:23 AM9/10/15
to Scroll Viewport Developers
We are getting inconsistent results with this. Sometimes it works, and other times not. For now we have had to add our own favicon to the project and refer to it like this:

<link rel="shortcut icon" type="image/x-icon" href="${theme.baseUrl}/images/favicon.ico"/>

area...@atlassian.com

unread,
Sep 10, 2015, 2:34:55 AM9/10/15
to Scroll Viewport Developers
I can see the issue. For the fav icon themes generally do this:

<link rel="icon" type="image/png" href="/imgs/favicon.png"/>

However, if the site is mounted under a non root directory (eg site.com/confluence/...) then /imgs would be the wrong path.

Is there a way to grab the confluence 'root' path?

area...@atlassian.com

unread,
Sep 10, 2015, 2:36:02 AM9/10/15
to Scroll Viewport Developers
* Is there any way to grab the 'Server Base URL' and not the theme baseUrl?

area...@atlassian.com

unread,
Sep 10, 2015, 2:54:39 AM9/10/15
to Scroll Viewport Developers
Nevermind: $baseUrl.

The example you posted `developer.atlassian.com` has the favicon mounted at /imgs/favicon.png. This is not standard. It looks like it can be pulled from different locations (eg: <link rel="icon" type="image/x-icon" href="/confluence/s/en_GB/5983/NOCACHE1/_/favicon.ico">). For now I have just included the favicon in my theme which is not ideal. 

Roman Serazhiev (K15t Software)

unread,
Sep 10, 2015, 3:51:53 AM9/10/15
to Scroll Viewport Developers
Hi Alexander,

Glad you have a solution that works.

I have tried adding a favicon to the Confluence server folder, then referencing it using this: <link rel="shortcut icon" href="$baseUrl/images/icons/favicon.png">. When I have configured a certain Viewport space to use a Domain Name that is different from Confluence Base URL, the favicon was working. Its URL was correctly changed to a base URL from domain name that I have inserted.

Is it the ideal behaviour you would want to have with favicons?

Cheers,
Roman.

area...@atlassian.com

unread,
Sep 10, 2015, 7:54:06 PM9/10/15
to Scroll Viewport Developers
'I have tried adding a favicon to the Confluence server folder'. This might not always be possible. Ideally we would use the default confluence generated one: 
'<link rel="shortcut icon" href="/s/en_GB/6160/9526a83ea640c6c4a5883fb68149cda455a71f01.82/_/favicon.ico">'

It would be great if we could do something like: `$favicon` which is a pointer to the standard favicon for that instance. 

Roman Serazhiev (K15t Software)

unread,
Sep 11, 2015, 5:37:29 AM9/11/15
to Scroll Viewport Developers
Hi Alexander,

You can actually achieve it like this:

$baseUrl/favicon.ico


So, in viewport's HTML head you would need to add something like this:

<link rel="shortcut icon" href="$baseUrl/favicon.ico">

From now on Viewport picks up the site-wide favicon. If someone changes it using Admin -> Look and Feel -> Favicon, then it will be changed for the Viewport pages as well.
Does this work for you?

Cheers,
Roman.

area...@atlassian.com

unread,
Sep 13, 2015, 11:32:03 PM9/13/15
to Scroll Viewport Developers
That worked perfectly Roman. Thanks!

Roman Serazhiev (K15t Software)

unread,
Sep 17, 2015, 2:54:20 AM9/17/15
to Scroll Viewport Developers
Hi Alexander,

We have also implemented a placeholder for the space logo. With Viewport 2.1.15 you can now access it through $repository placeholder:

$repository.logo
$repository.logo.link
$repository.logo.absoluteLink
$repository.logo.isDefault

Cheers,
Roman.

area...@atlassian.com

unread,
Sep 21, 2015, 3:16:09 AM9/21/15
to Scroll Viewport Developers
Cheers
Reply all
Reply to author
Forward
0 new messages