Forums / Setup & design / Including non-existing template

Including non-existing template

Author Message

Radek Kuchta

Friday 07 March 2008 5:07:41 am

Hi all,

In my pagelayout.tpl I am including my own tamplate (which is not exist)

{include uri='design:parts/xxxxxxxx.tpl'}

As we can read in the manual http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/designs/design_combinations#automatic_fallback
if the requested file hasn't been found, eZ publish will display an error message.

I didn't create xxxxxxxx.tpl but eZ doesn't give me any error message.
I am using eZ 4.0 and I have enabled Template debug & Debug output.

My question is why eZ doesnt inform me about missing template?

http://ez.no/certification/verify/272582

André R.

Friday 07 March 2008 6:21:12 am

I think it depends on if you are using template compilation or not, template compilation will (if at all) just give you a error when it is compiled I guess.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Radek Kuchta

Monday 10 March 2008 12:35:44 am

Hi André,

I'm using template complilation and template cache.

[TemplateSettings]
TemplateCache=enabled
TemplateCompile=enabled

When I'm runing the page first time (after clearing cache), then eZ inform me:

Notice:
eZTemplate: Loading template "parts/xxxxxxxxx.tpl" with resource "design"

but template doesn't exist.

Mike Melli

Thursday 03 April 2008 2:29:40 pm

Along these same lines, there seems to be a definite bug in the template automatic fallback system in eZpublish 4.0.

I've been working with eZpublish since around 3.8.6 and I've gotten pretty comfortable with the ins and outs of the override system. I often use simple includes such as:

{include uri="design:includes/breadcrumbs.tpl}

Which always automatically used the current site design and found the file successfully with a path such as:

design/plain_site/override/templates/includes/breadcrumbs.tpl

When I tried using this same convention in 4.0, the debug output would say that it was loading the template but it was clearly not.

eZTemplate: Loading template "includes/breadcrumb.tpl" with resource "design"

After struggling to figure out why, I decided to try to give it an explicit override in the siteaccess's override.ini:

[breadcrumb]
Source=includes/breadcrumb.tpl
MatchFile=includes/breadcrumb.tpl
Subdir=templates

This seems pretty pointless to me, as I'm overriding a file with the same file! But it worked.

So, seems like there's something up here. You now have to explicitly set ALL of your overrides, even if they're in the same directory structure as the default templates.

Kristof Coomans

Thursday 03 April 2008 11:49:40 pm

Hi Mike

On a pre-4.0 site it was possible to put non-override templates, like the one you have there, in the override folder. In 4.0 we have restricted this in a way that templates that are loaded by override.ini need to be placed in the override/templates folder and templates that are not loaded by override.ini should be placed in the regular templates folder, so it will be easier to find your templates back (at least if you are aware of this fact) and more predictable which template will be loaded. In your case, you have put a template not loaded by override.ini ({include uri='design:***.tpl'} and no override in override.ini for **.tpl) in the override/templates folder.

See "Step 4: Updating the system configuration", "Custom/override templates location" in the upgrade guide: http://ez.no/doc/ez_publish/upgrading/upgrading_to_4_0/from_3_10_0_to_4_0_0

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

eZ debug

Timing: Jan 18 2025 22:39:29
Script start
Timing: Jan 18 2025 22:39:29
Module start 'content'
Timing: Jan 18 2025 22:39:30
Module end 'content'
Timing: Jan 18 2025 22:39:30
Script end

Main resources:

Total runtime0.8996 sec
Peak memory usage4,096.0000 KB
Database Queries206

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0100 589.6172180.8359
Module start 'content' 0.01000.7410 770.4531689.6016
Module end 'content' 0.75100.1486 1,460.0547337.0938
Script end 0.8996  1,797.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00490.5412210.0002
Check MTime0.00140.1605210.0001
Mysql Total
Database connection0.00160.173210.0016
Mysqli_queries0.806889.68402060.0039
Looping result0.00300.33122040.0000
Template Total0.865596.220.4328
Template load0.00260.293720.0013
Template processing0.862995.910120.4314
Template load and register function0.00010.014110.0001
states
state_id_array0.00120.129010.0012
state_identifier_array0.00100.106020.0005
Override
Cache load0.00200.2174400.0000
Sytem overhead
Fetch class attribute can translate value0.00130.144060.0002
Fetch class attribute name0.00260.292980.0003
XML
Image XML parsing0.00390.431860.0006
class_abstraction
Instantiating content class attribute0.00000.001680.0000
General
dbfile0.00370.4065400.0001
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 28
 Number of unique templates used: 7

Time used to render debug report: 0.0003 secs