Moving eZPublish 3.9.x to eZPublish 4.x

Author Message

Clemens T

Tuesday 09 February 2010 7:59:04 am

Hello everyone,

I would love to learn how to migrate my website with an php4 installation and eZPublish 3.9.x to eZPublish 4.x.

Could anyone give me some pointers on how to do it and what NOT to do? I would love not to have to do all the incremental upgrades because that will take me a lot of time (copying all the eZPublish files for every minor version is not a nice thing to do), is there any shortcut to that?

1) What should be executed still in php4 and what in php5 in the total migration project?

2) How can I make sure all the objects/rights etc are exported/imported correctly?

3) What are the most important differences I have to take into account for my custom developed extensions with this migration?

4) What if I were to convert a 3.8.x installation to 4.x? Any other things required to do besides the steps above?

Thanks for all the help!

Clemens

Edi Modrić

Tuesday 09 February 2010 12:42:19 pm

Hi Clemens!

Well, obviously, first of all you need to upgrade your server to PHP5 to be able to upgrade eZ Publish. I suggest you to make a local copy of your website and do the upgrade in house, while taking your server offline to do the upgrade of PHP at the same time. This way, there will a minimum downtime to your website. Ofcourse, you'll need two local servers for this to work, one that hosts PHP4 and one that hosts PHP5. When done, just upload your upgraded installation, restore the database and you're set.

Now, as a general rule of thumb, you DON'T have to do all the incremental versions while upgrading. In 99% of the cases, the latest one in a release cycle should be fine. For example, 3.9.3 -> 3.9.5 -> 3.10.1 -> 4.0.7 -> 4.1.4 -> 4.2.0. I would recommend you to read the upgrade instructions ( http://ez.no/doc/ez_publish/upgrading ) very carefully, they're all that's needed to get you started.

1) In this case for example, you use PHP4 while executing the scripts from 3.9.5 and 3.10.1 versions, and PHP5 for the rest of them.

2) Well, you really can't be sure till the very end and checking it by yourself. Backup of your original installation IS A MUST, in case anything goes wrong. You can also make DB backups between each upgrade step (when done upgrading to 3.10.1, for example), so you can easily go back to the previous step if something goes wrong and not having to do the upgrade all the way from the start.

3) Any custom designs you have must be changed so all the override templates reside in override/templates folder as specified in your override.ini. Also, if you have PHP code in your extensions, it'll probably be have to changed to accomodate new syntax rules of PHP5 and changes to eZ Publish API. Also, take notice that eZ Publish 4.0.7 is the last version that uses eZXml library. In 4.1.0 and later, it was replaced by PHP5 DOM, so keep an eye out for that.

ezdhtml extension was replaced by ezoe (Online Editor) in few latest versions of eZ Publish. ezdhtml doesn't work on PHP5.

4) Converting the DB and your templates to UTF8. Then doing upgrades to multilanguage url aliases introduced in 3.10.x (in that order)...

Once again, do read the instructions on the link above, those are a big help and you'll need them!

Good luck with the upgrade!

eZ Publish certified developer

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

Bruce Morrison

Tuesday 09 February 2010 3:50:54 pm

Hi Clemens

Having just completed an upgrade from 3.6 to 4.2 I can completely agree with Edi. I'll add that you should practice the upgrade on your dev servers this will ensure you "get it right" and also provides some indicative timings which can help when planing the live upgrade.

If you can write scripts to automate each step of the process, and fine tune these until you are confident they do the job. Keep notes on any steps that must be done manually.

One addition to the using the new online editor is users needs to have specific permissions to access it. So if you have an editor role that has restricted permissions you'll need to add a policy for ezoe.

Good luck with the upgrade!

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Clemens T

Thursday 11 February 2010 8:21:59 am

@Edi, Bruce, thanks for both insightful replies.

However, there is one thing that is still not clear to me.

Base plan

Goal: upgrade with the minimum effort that doesn't have any critical risks.

Servers: 2 php4 servers, 1 php5 server

PHP4 Server 1: eZ 3.x (current installation)

PHP4 Server 2: aiming to get: eZ 3.10.1 on it (initially a copy of PHP4 Server 1)

PHP5: aiming to get installation of PHP4 Server 2 to eZ 4.2 (initially a copy of PHP4 Server 2)

Your answers have helped me on some details already, but there is still one major thing missing in my view. How often do I need to re-copy all the eZPublish distribution files for this?

In my view there are two options for the PHP4 part of this:

1) Do I need to 'install' my website on eZ 3.9.5, and then consecutively on 3.10.1?

2) Do I need to 'install' my website on eZ 3.10.1 and then execute the /update files from the eZ 3.9.5 installation on my eZ 3.10.1 installation and then afterwards the updates from 3.10.1 in the right order?

What is the best option for the PHP5 part? Just the updates or everytime a new distribution-files-installation-update?

Thanks!!

Clemens

Bruce Morrison

Thursday 11 February 2010 2:59:20 pm

Hi Clemens

Yes you have to "install" your site on each distribution. So if your site is running on eZ 3.9.5 and you want to upgrade to 3.10.1 you'll

  1. Backup your database
  2. Unpack the 3.10.1 distribution
  3. Copy your site across (any settings, designs, custom extensions, var/site directories )
  4. Perform the upgrade as per http://ez.no/doc/ez_publish/upgrading
  5. Repeat for next major release

HTH

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Clemens T

Saturday 13 February 2010 3:08:17 am

Heya Bruce,

Thanks for the link, and the plan with detail. I think I'll be able to handle the upgrade process now. I'll post any problems/solutions here!

Regards,

Clemens

Brian Wesaala

Monday 22 March 2010 8:26:07 am

Hi All,

This thread is of interest to me as am attempting to upgrade to 3,10.1 and ultimately to to 4.2.1. I am following the upgrade instructions given on a dev server. However, the updateniceurls.php scripts keeps failing. From other threads I have come across this seems to be a persistent issue. Has anyone of you encountered a problem with this script. Please advise on what I should do...

This is the error am getting:

Fatal error: Call to a member function on a non-object in /home/xxx/ezpublish-3.10.1/kernel/classes/ezcontentobjecttreenode.php on line 3927

Fatal error: eZ Publish did not finish its request
The execution of eZ Publish was abruptly ended, the debug output is present below.


Bruce Morrison

Monday 22 March 2010 3:57:15 pm

Hi Brian

Apply this patch to ezcontentobjecttreenode.php

@@ -3992,7 +3992,15 @@
         {
             if ( !isset( $parentNode ) )
                 $parentNode = $this->fetchParent();
-            $pathIdentificationString = $parentNode->attribute( 'path_identification_string' );
+            if( is_object( $parentNode ) )
+            {
+               $pathIdentificationString = $parentNode->attribute( 'path_identification_string' );
+           }
+           else
+            {
+                eZDebug::writeError( 'Failed to fetch parent node for pathIdentificationName "' . $pathIdentificationName .
+                                     '" and parent_node_id ' . $this->attribute( 'parent_node_id' ) );
+            }
         }
         if ( strlen( $pathIdentificationString ) > 0 )
             $pathIdentificationString .= '/' . $pathIdentificationName;

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Brian Wesaala

Wednesday 21 April 2010 8:23:42 am

Hi Bruce

Thank you very much for your input. Sorry I took so long to replay to the thread!

I edited the ezcontentobjecttreenode.php as you suggested and I managed to get past the point that the script was failing. However, I still get the same error but on a different line.

PHP Fatal error: Call to a member function on a non-object in /xxx/xxx/kernel/classes/ezcontentobjecttreenode.php on line 3927
Fatal error: eZ Publish did not finish its request

I am a php newbie I therefore did not quite understand what the patch was fixing!! I will soon be starting on an upgrade to the supprted version 4. Hope it will be much smoother. Thanks a lot!

Brian

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