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.

eZ debug

Timing: Jan 18 2025 18:34:08
Script start
Timing: Jan 18 2025 18:34:08
Module start 'layout'
Timing: Jan 18 2025 18:34:08
Module start 'content'
Timing: Jan 18 2025 18:34:09
Module end 'content'
Timing: Jan 18 2025 18:34:09
Script end

Main resources:

Total runtime1.0737 sec
Peak memory usage4,096.0000 KB
Database Queries71

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 589.8125152.6406
Module start 'layout' 0.00680.0030 742.453139.4766
Module start 'content' 0.00981.0624 781.9297638.6406
Module end 'content' 1.07220.0015 1,420.570320.1250
Script end 1.0737  1,440.6953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3110160.0002
Check MTime0.00130.1200160.0001
Mysql Total
Database connection0.00070.064310.0007
Mysqli_queries0.981591.4046710.0138
Looping result0.00070.0657690.0000
Template Total1.042597.120.5213
Template load0.00230.215020.0012
Template processing1.040296.874720.5201
Template load and register function0.00020.015410.0002
states
state_id_array0.00100.089210.0010
state_identifier_array0.00150.144420.0008
Override
Cache load0.00200.1858590.0000
Sytem overhead
Fetch class attribute can translate value0.00100.091730.0003
Fetch class attribute name0.00180.1667100.0002
XML
Image XML parsing0.00450.417130.0015
class_abstraction
Instantiating content class attribute0.00000.0034140.0000
General
dbfile0.00420.3916290.0001
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
15content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
8content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 40
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs