Strange behavior for favicon.ico retrieval

Author Message

Massimiliano Bariola

Tuesday 30 October 2007 3:53:11 am

Hi all,

I am using a design extension to provide a design for my site. I put my favicon.ico in the images/ directory of my design extension, along with all the other images for my design.

The problem is that, while all images are correctly resolved by the ezimage operator to the design extension's directory, the favicon is resolved to the standard design.

<link href={"stylesheets/basic.css"|ezdesign} rel="stylesheet" type="text/css" media="all" />

correctly resolves to

<link href="/extension/inca_ch_design/design/standard/stylesheets/basic.css" rel="stylesheet" type="text/css" media="all" />
<img src={'logoinca.gif'|ezimage} alt="Logo INCA CH IT"/>

correctly resolves to

<img src="/extension/inca_ch_design/design/standard/images/logoinca.gif" alt="Logo INCA CH IT"/>
<link rel="Shortcut icon" href={'favicon.ico'|ezimage} type="image/x-icon" />

strangely resolves to

<link rel="Shortcut icon" href="/design/standard/images/favicon.ico" type="image/x-icon" />

this are the relevant parts of my design.ini and site.ini files:

/settings/siteaccess/inca_ch_it/site.ini.append.php:

[DesignSettings]
SiteDesign=inca_ch_user
AdditionalSiteDesignList[]=base
StandardDesign=standard

/extension/inca_ch_design/settings/design.ini.append.php:

[ExtensionSettings]
DesignExtensions[]=inca_ch_design

/extension/inca_ch_design/settings/site.ini.append.php:

[RegionalSettings]
TranslationExtensions[]=inca_ch_design

can anyone help me in spotting the error?

cheers,

Massimiliano

Knut Urdalen

Tuesday 30 October 2007 4:16:17 am

Try:

<link rel="shortcut icon" href={'images/favicon.ico'|ezdesign} type="image/x-icon" />
<link rel="shortcut icon" href={'images/favicon.ico'|ezdesign} type="image/vnd.microsoft.icon" />
<link rel="icon" href={'images/favicon.ico'|ezdesign} type="image/vnd.microsoft.icon" />

Massimiliano Bariola

Tuesday 30 October 2007 4:28:19 am

Hi Knut,

Thank you, the workaround worked. Yet I am still curious as to what am I doing wrong and why do I need to do it with ezdesign instead of ezimage. Just to know if I need to open up a bug report or not.

Thanks again,

Massimiliano

Knut Urdalen

Tuesday 30 October 2007 5:19:57 am

I use ezdesign instead of ezimage most of the time because I have had some problems like this before. It seems like you have hit a bug.

You can have a look at the implementation of these two operators in kernel/common/ezurloperator.php

(case $this->DesignName) you'll find the implementation of ezdesign
(case $this->ImageName) you'll find the implementation of ezimage

Massimiliano Bariola

Tuesday 30 October 2007 6:23:17 am

Hi Knut,

Ok, I'll have a look at it.

thank you and kind regards,

Massimiliano

Xavier Dutoit

Tuesday 30 October 2007 7:10:13 am

+1 For Knut's suggestion to stick with ezdesign

As for the design, I tend to prefer having them as design rather than extension, as the override priorities works better when using "real" extension usually.

X+

http://www.sydesy.com

Massimiliano Bariola

Wednesday 31 October 2007 9:13:40 am

Hi Xavier,

I went the extension way to make the code structure more compliant to eZ's guidelines (at least those I remember since Lyon in january :-) ) It makes sense after all to use ezdesign since stylesheets are accessed the same way. Anyway I opened a bug, just to be sure that either the documentation will be updated or ezimage will be fixed.

Thanks to both,

Massimiliano

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.