Template override - Different behaviour in eZpublish 4

Author Message

John Smith

Wednesday 20 August 2008 2:58:09 am

Hi there,

Hope somebody can help me.

I designed few sites in ezpublish 3.6.1, while designing there were few templates which I created in /design/news/override/ which automatically overridden /design/base/override/

One of them was
design/news/override/templates/embed/image.tpl

Which overridden
design/base/override/templates/embed/image.tpl

The debug result is:

Version 3.6.1

Requested template	Template		Template loaded

content/view/embed.tpl		embed/image.tpl		design/news/override/
							templates/embed/image.tpl

Now when I upgrade version 3.6.1 to 4.0, I copied all the design/news folder with other upgrade steps... Now the template /design/news/override/embed/image.tpl is not overridding /design/base/over/embed/image.tpl

The debuy result is:

Version 4.0.0

Requested template		Template		Template loaded

content/view/embed.tpl		embed/image.tpl		design/base/override/
							templates/embed/image.tpl

Please help

André R.

Wednesday 20 August 2008 3:07:39 am

The only difference I know of is that you in 4.0 need to have overrides in the override folder and directly included templates / system templates in the template directory. But thats not the issue here.

How is you design settings in site.ini defined?
And remembered to clear cache(template override cache)?

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

John Smith

Wednesday 20 August 2008 3:27:03 am

The only difference I know of is that you in 4.0 need to have overrides in the override folder and directly included templates / system templates in the template directory. But thats not the issue here.

Version 3.6.1:

/design/news/templates/embed/file.tpl
/design/news/templates/embed/image.tpl
/design/news/templates/galleryline/image.tpl
/design/news/templates/galleryslide/image.tpl

These are the templates manually created by me, where as the templates which are created by the system when you create/override through the adminstration interface, they go straight into the /design/news/override/templates.

<b> One thing here to be noted in the above list, I have done same thing for the file as well and the /design/news/templates/embed/file.tpl is overridding the /design/base/templates/embed/file.tpl</b>

<b>It seems a buy for images and gallery images</b>

It is also the same in the version 4.0 as I copied the whole news folder while upgrading.

How is you design settings in site.ini defined? 
And remembered to clear cache(template override cache)? 

[DesignSettings]
SiteDesign=news
AdditionalSiteDesignList[]=base

I cleared all cache and again specially template override cache as well.

Please help

André R.

Wednesday 20 August 2008 7:37:39 am

In your first post you said:
design/news/override/templates/embed/image.tpl

In your second you say:
/design/news/templates/embed/image.tpl

Witch one is it?
If your trying to override design/base/override/templates/embed/image.tpl, then only the first one will work.

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

John Smith

Wednesday 20 August 2008 8:32:33 am

Actually it is the following all the way:

/design/news/templates/embed/image.tpl

What I did, I just moved few directories to the /design/news/override/templates/ which also include embed/image.tpl.... after looking the pattern in new ez4 installation.

It worked, I dont know whether I have done right or wrong, but it seems working. This thing should be the part of the documentation who are doing the upgrades from 3.6.1 to 4.0.0, otherwise their overrides will not work.

<b> Still it is different behaviour than ez3.6.1</b>

Any comments???

André R.

Wednesday 20 August 2008 9:04:16 am

It's the very thing I mentioned in my first post:

The only difference I know of is that you in 4.0 need to have overrides in the override folder and directly included templates / system templates in the template directory. But thats not the issue here.

And its actually mentioned here:
http://ez.no/doc/ez_publish/upgrading/upgrading_to_4_0/from_3_10_0_to_4_0_0#eztoc85574_1_4_1

But it's easy to overlook / misunderstand, I give you that =)

> But thats not the issue here.
The reason I said this was that you said you had your overrides in the override dir, ref:

One of them was
design/news/override/templates/embed/image.tpl

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

Svitlana Shatokhina

Friday 22 August 2008 3:25:58 am

Side note: the 3.10.0->4.0.0 upgrade doc mentioned above is now deprecated. (Reason: after 4.0.1 is released, new upgrades should be done to 4.0.1, not 4.0.0.)

The change to the template system is described in the new doc as well:
http://ez.no/doc/ez_publish/upgrading/upgrading_to_4_0/from_3_10_x_to_4_0_y#eztoc98376_4

John Smith

Friday 22 August 2008 4:13:21 am

Hi Svitlana,

Thanks for kind update. Just clearing few points.

I can directly go from 3.10.0 to 4.0.1. or I have to go from 4.0.0 to 4.0.1

Please help...

Svitlana Shatokhina

Friday 22 August 2008 4:36:10 am

Hi John,

If you are currently running 3.10.0, the recommended upgrade path is:

3.10.0-->3.10.1-->4.0.1

Make sure you read and follow the upgrade instructions:
http://ez.no/doc/ez_publish/upgrading/upgrading_to_3_10/from_3_10_x_to_3_10_y
http://ez.no/doc/ez_publish/upgrading/upgrading_to_4_0/important_notes
http://ez.no/doc/ez_publish/upgrading/upgrading_to_4_0/from_3_10_x_to_4_0_y

(4.0.0 is not recommended because of possible troubles with URL aliases)

Best regards!
Sveta

John Smith

Friday 22 August 2008 5:27:22 am

I am not using 3.10.x, I am coming from 3.6.1, all 3.6.1 installs need to be upgraded to 4 series due to php5 pressure, so just want to know the best way to 4.0.1 please....

Thanks once again....

Svitlana Shatokhina

Friday 22 August 2008 5:47:33 am

I'd say 3.6->3.8->3.9->3.10.1->4.0.1 then, but please read these pages carefully before you start with upgrading:
http://ez.no/doc/ez_publish/upgrading/how_to_proceed
http://ez.no/doc/ez_publish/upgrading/upgrading_from_3_a_b_to_3_x_y

Btw, I will most likely add some small changes to the 3.9.x-->3.10.y upgrade doc in the next couple of days (hopefully nothing serious, but we'll see).

John Smith

Monday 01 September 2008 8:50:02 am

Hi Svitlana,

Upgrades

3.6.1 to 3.8.0 successful
3.8.0 to 3.9.0 successful
3.9.0 to 3.10.1 successful
3.10.1 to 4.0.1 successful

Two things which seems unusual which it is not effecting/breaking anything. Just posting somebody might help me in solving:

1. Look and feel in the Design section getting two locations
Design / <site title>(Main)
Setup / <site title> ( I dont from where it is coming)

2. Gobal settings in Setup section getting two locations:
Setup / Common INI settings (Main)
Setup / Common INI settings

Even if select one of the unwanted one to delete, I am unable to delete the unwanted one.

Has somebody else getting the same things after upgrading from 3.6.1 to 4.0.1??

Much appreciated...

Smith

Svitlana Shatokhina

Thursday 04 September 2008 8:49:08 am

Hi,

Sorry, I cannot help here; don't know what it can be. Perhaps report the problem to http://issues.ez.no

Best regards!
Sveta

André R.

Thursday 04 September 2008 9:34:44 am

Try to reproduce it and write down exactly on witch step it happens before you create a issue, and do search for existing issues on it first.

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

John Smith

Friday 05 September 2008 4:25:17 am

Hi,

Thanks for your kind help. I checked this morning. It is happening at very first step, which is while upgrading from 3.6.1 to 3.8.0. As Andre suggested I have not done step by step in the process of upgrading 3.6.1 to 3.8.0. To be frank there are only two steps:

update/common/scripts/updatemultilingual.php -s <admin_siteaccess>

update/common/scripts/updaterssimport.php -s <admin_siteaccess>

Will let you know after going through each of mentioned above.

One more thing if you can help me:

In the process of upgrading 3.9.0 to 3.10.1

I am running:

php bin/php/ezimportdbafile.php --datatype=ezisbn -s <admin_siteaccess>
php bin/php/ezconvert2isbn13.php --force -s <admin_siteaccess>

The output on the command line is:

Importing DBA File
The database is updated for the datatype: ezisbn
dba-data is imported from the file: kernel/classes/datatypes/ezisbn/share/db_data.dba
Converting isbn13 file
Usage: bin/php/ezconvert2isbn13.php [OPTION]...
eZ Publish ISBN-10 to ISBN-13 converter

Converts an ISBN-10 number to ISBN-13


General options:
  -h,--help        display this help and exit
  -q,--quiet       do not give any output except when errors occur
  -s,--siteaccess  selected siteaccess for operations,
                     if not specified default siteaccess is used
  -d,--debug...    display debug output at end of execution,
                     the following debug items can be controlled:
                     all, accumulator, include, timing, error, warning, debug or notice.
  -c,--colors      display output using ANSI colors (default)
  --no-colors      do not use ANSI coloring
  --logfiles       create log files
  --no-logfiles    do not create log files (default)
  -v,--verbose...  display more information,
                     used multiple times will increase amount of information

Options:
  --class-id=VALUE      The class id for the ISBN attribute.
  --attribute-id=VALUE  The attribute id for the ISBN attribute which should be converted.
  --all-classes         Will convert all ISBN attributes in all content classes.
  -f                    Short alias for force.
  --force               Will convert all attributes even if the class is set to ISBN.

Is the output right?

Cheers

John Smith

Friday 05 September 2008 8:04:55 am

hello,

Checked this afternoon, the two locations in (setup->design -> look and feel and setup-> global settings ) are coming after I am running the following command while upgrading 3.6.1 to 3.8.0

php update/common/scripts/updatemultilingual.php -s <siteaccess>

Cheers

John Smith

Tuesday 09 September 2008 6:00:48 am

Anyone please?

Vidar Langseid

Wednesday 10 September 2008 12:14:04 am

As mentioned in the upgrade doc for 3.8:
"Before continuing, note that it is recommended to upgrade directly to the latest stable release in the 3.8 branch"

That means that you should not use the updatemultilingual.php script shipped with 3.8.0. Instead you should run the version shipped with 3.8.10. (This also counts for the other upgrade scripts for 3.8) Check if that makes the difference

Best regards,
Vidar

John Smith

Wednesday 10 September 2008 7:11:01 am

Hi Vidar,

After your reply, I upgraded the system from 3.6.1 to 3.8.12, I am still getting the two locations as mentioned in my eariler post.

I wonder nobody else has got this problem? Everything else working fine without anyproblems...

Tried again with 3.6.1 to 3.6.12 and then 3.6.12 to 3.8.12. Same thing happening. Anyone else, I need to update my sites because I got a notice of one week due to php5 switch over.

Please help.

Cheers

John Smith

Thursday 11 September 2008 4:25:36 am

Hi Vidar,

To solve what is going on, I compared the template files from version 3.6.1 and version 3.8.12 which is responsible for locations layout.

/design/admin/templates/locations.tpl

Obviously they are quite different because of version difference.

To check I copied the old locations.tpl from 3.6.1 and it worked fine there are no two locations now. Is it a bug in the new template file which needs to be reported?

Any comments?

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