Share » Forums » Install & configuration » Problem with content after upgrade to...

Problem with content after upgrade to 3.8.2

Problem with content after upgrade to 3.8.2

Thursday 27 July 2006 7:41:57 pm - 19 replies

Modified on Thursday 27 July 2006 7:44:55 pm by Nicolay Camargo

Author Message

Marcin Drozd

Friday 28 July 2006 12:20:40 am

Hi
I've had the same problem. I had to run updatemultilingual.php.

http://ez-publish.pl

Nicolay Camargo

Friday 28 July 2006 8:52:45 am

That's right!! I think the problem is related with updatemultilingual.php script or something like that. Unfortunately when I run the script I get the following error:


Step 2/6: Identifying languages used on the site:

Fatal error: Call to undefined function:  pg_escape_string() in /home/reyte/www/lib/ezdb/classes/ezpostgresqldb.php on line 573

 

Note that my ezp root path is: /home/reyte/www

I have overcome this error by changing in ezpostgresqldb.php on line 573 the <b>pg_escape_string()</b> function to <b>addslashes( $str )</b> function which is almost the same. Then the script ran successfully but the problem is still there.

Furthermore there are something bad in the db because ezcontent_language table is empty and all rows at "language_mask" field in "ezcontentobject" table are set to "NULL".

someone have any idea?

Thanks,

Nicolay
Corenet S.A.
Bogota - Colombia
www.corenet.net.co
acamargo@corenet.net.co

Marcin Drozd

Friday 28 July 2006 9:03:22 am

Hi
if need be:
http://ez.no/download/ez_publish/changelogs/ez_publish_3_8/upgrading

http://ez-publish.pl

Kristof Coomans

Friday 28 July 2006 9:14:08 am

Are you using PostgreSQL as your database? Did you enable the pgsql PHP extension (http://www.php.net/pg_escape_string is part of it)? Which version of PHP are you running?

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

Nicolay Camargo

Friday 28 July 2006 9:29:24 am

Hi Kristof,

Yes! I'm using PostgreSQL as database.
PHP version: 4.4.1
and I don't know if the pgsql PHP extension is enabled. Can you help me with this?

Here is a more complete system info:

System: Linux 2.6.13-1.1532_FC4smp #1 SMP i686
eZ publish version: 3.8.2
PHP version: 4.4.1
Database: PostgreSQL 8.0.3
Web server: Apache/2.0.54 (Fedora)
PHP PostgreSQL Support: enabled

could this problem be related with New bug: problem with sql update file update/database/postgresql/3.8/dbupdate-3.6.0-to-3.8.0.sql?
see: http://ez.no/bugs/view/8729

Thanks in advance.

Thanks,

Nicolay
Corenet S.A.
Bogota - Colombia
www.corenet.net.co
acamargo@corenet.net.co

Kristof Coomans

Saturday 29 July 2006 1:55:21 am

Hello Nicolay

Your webserver environment seems alright. You should check if the cli version of php also has the pgsql extension enabled (does it use the same php.ini file as the webserver?).

could this problem be related with New bug: problem with sql update file update/database/postgresql/3.8/dbupdate-3.6.0-to-3.8.0.sql?

No idea. We always use MySQL.

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

Nicolay Camargo

Saturday 29 July 2006 2:45:44 pm

Hello,

The upgrade was successfully completed!!!!

The problem was overcome with the following changes and reviews:

1. Some sentences were changed in the dbupdate-3.6.0-to-3.8.0.sql script. (see my comment in the new bug: http://ez.no/bugs/view/8729 )

2. Although my webserver environment seems alright I had to make sure about what PHP version I was running when executing updatemultilingual.php script. My webserver has another version of PHP where the pgsql PHP module was disabled. Then I had to execute the command with the full path of my desired php version like this:


/usr/local/apache2/php/bin/php -c /usr/local/apache2/php/php.ini update/common/scripts/updatemultilingual.php -s corporate_user

 

The -c option is set in order to make sure PHP were loading the right config file (where the pgsql extension is enabled). Thank you Kristof. At this point your help were the key.

3. Go on with upgrading installation instructions.

Thank you a lot,

Nicolay

Thanks,

Nicolay
Corenet S.A.
Bogota - Colombia
www.corenet.net.co
acamargo@corenet.net.co

Andrew Kelly

Friday 04 August 2006 4:52:14 am

Hi folks,

I'm having similar problems to Nokolay, trying to upgrade from 3.7.6 to 3.8.3.
When running update/database/postgresql/3.8/dbupdate-3.6.0-to-3.8.0.sql I'm getting
complaints of colums containing null values.
Is there a fix for this?
Is the script written incorrectly, or is it a case of incompatability with existing data?

Andy

Andrew Kelly

Friday 04 August 2006 5:16:47 am

Oh, jeez, forgive my sloppy typing, Nicolay. I'm really sorry.

Also, I've altered the script to catch this problem.

Every where you see something like this:

ALTER TABLE <table_name> ALTER <column_name> SET DEFAULT '';
ALTER TABLE <table_name> ALTER <column_name> SET NOT NULL;

Just add this statement before the SET NOT NULL statement:

UPDATE <table_name> SET <column_name> = '<default_value>' WHERE <column_name> IS NULL;

Andy

Andrew Kelly

Thursday 10 August 2006 7:32:08 am

In fact, here's a patch file if it's easier.

--- ezpublish-3.8.3/update/database/postgresql/3.8/dbupdate-3.6.0-to-3.8.0.sql 2006-07-26 12:41:15.000000000 +0200
+++ portal/update/database/postgresql/3.8/dbupdate-3.6.0-to-3.8.0.sql   2006-08-10 16:08:16.000000000 +0200
@@ -20,8 +20,8 @@

 -- Improved RSS import. -- START --
 ALTER TABLE ezrss_import ADD COLUMN import_description text;
-ALTER TABLE ezrss_import ALTER import_description SET NOT NULL;
 ALTER TABLE ezrss_import ALTER import_description SET DEFAULT '';
+ALTER TABLE ezrss_import ALTER import_description SET NOT NULL;
 -- Improved RSS import. -- END --

 -- Multicurrency. -- START --
@@ -75,8 +75,9 @@


 ALTER TABLE ezproductcollection ADD currency_code varchar(4);
-ALTER TABLE ezproductcollection ALTER currency_code SET NOT NULL;
 ALTER TABLE ezproductcollection ALTER currency_code SET DEFAULT '';
+UPDATE ezproductcollection SET currency_code = '' WHERE currency_code IS NULL;
+ALTER TABLE ezproductcollection ALTER currency_code SET NOT NULL;
 -- Multicurrency. -- END --

 -- Improved packages system -- START --
@@ -136,38 +137,47 @@

 ALTER TABLE ezcontentobject ADD COLUMN language_mask int;
 ALTER TABLE ezcontentobject ALTER COLUMN language_mask SET DEFAULT 0;
+UPDATE ezcontentobject SET language_mask = '0' WHERE language_mask IS NULL;
 ALTER TABLE ezcontentobject ALTER COLUMN language_mask SET NOT NULL;

 ALTER TABLE ezcontentobject ADD COLUMN initial_language_id int;
 ALTER TABLE ezcontentobject ALTER COLUMN initial_language_id SET DEFAULT 0;
+UPDATE ezcontentobject SET initial_language_id = '0' WHERE initial_language_id IS NULL;
 ALTER TABLE ezcontentobject ALTER COLUMN initial_language_id SET NOT NULL;

 ALTER TABLE ezcontentobject_name ADD COLUMN language_id int;
 ALTER TABLE ezcontentobject_name ALTER COLUMN language_id SET DEFAULT 0;
+UPDATE ezcontentobject_name SET language_id = '0' WHERE language_id IS NULL;
 ALTER TABLE ezcontentobject_name ALTER COLUMN language_id SET NOT NULL;

 ALTER TABLE ezcontentobject_attribute ADD COLUMN language_id int;
 ALTER TABLE ezcontentobject_attribute ALTER COLUMN language_id SET DEFAULT 0;
+UPDATE ezcontentobject_attribute SET language_id = '0' WHERE language_id IS NULL;
 ALTER TABLE ezcontentobject_attribute ALTER COLUMN language_id SET NOT NULL;

 ALTER TABLE ezcontentobject_version ADD COLUMN language_mask int;
 ALTER TABLE ezcontentobject_version ALTER COLUMN language_mask SET DEFAULT 0;
+UPDATE ezcontentobject_version SET language_mask = '0' WHERE language_mask IS NULL;
 ALTER TABLE ezcontentobject_version ALTER COLUMN language_mask SET NOT NULL;

 ALTER TABLE ezcontentobject_version ADD COLUMN initial_language_id int;
 ALTER TABLE ezcontentobject_version ALTER COLUMN initial_language_id SET DEFAULT 0;
+UPDATE ezcontentobject_version SET initial_language_id = '0' WHERE initial_language_id IS NULL;
 ALTER TABLE ezcontentobject_version ALTER COLUMN initial_language_id SET NOT NULL;

 ALTER TABLE ezcontentclass ADD COLUMN always_available int;
 ALTER TABLE ezcontentclass ALTER COLUMN always_available SET DEFAULT 0;
+UPDATE ezcontentclass SET always_available = '0' WHERE always_available IS NULL;
 ALTER TABLE ezcontentclass ALTER COLUMN always_available SET NOT NULL;

 ALTER TABLE ezcontentobject_link ADD COLUMN op_code int;
 ALTER TABLE ezcontentobject_link ALTER COLUMN op_code SET DEFAULT 0;
+UPDATE ezcontentobject_link SET op_code = '0' WHERE op_code IS NULL;
 ALTER TABLE ezcontentobject_link ALTER COLUMN op_code SET NOT NULL;

 ALTER TABLE eznode_assignment ADD COLUMN op_code int;
 ALTER TABLE eznode_assignment ALTER COLUMN op_code SET DEFAULT 0;
+UPDATE eznode_assignment SET op_code = '0' WHERE op_code IS NULL;
 ALTER TABLE eznode_assignment ALTER COLUMN op_code SET NOT NULL;

 -- updates
@@ -186,4 +196,5 @@
 -- Information collection improvments
 ALTER TABLE ezinfocollection ADD creator_id INT;
 ALTER TABLE ezinfocollection ALTER COLUMN creator_id SET DEFAULT 0;
+UPDATE ezinfocollection SET creator_id = '0' WHERE creator_id IS NULL;
 ALTER TABLE ezinfocollection ALTER COLUMN creator_id SET NOT NULL;

Andy

John Smith

Friday 11 August 2006 1:47:50 am

Hi there,

I have upgraded ezpublish 3.6.1 to ezpublish 3.6.8. I followed all the steps as instructed by article "Upgrading from 3.6.x (3.7.x) to 3.8.0". All went very well. No errors at all.

The step I followed:

1. Upgrading the distribution files to 3.8.3
2. Upgrading the database to 3.8.3
3. Running the 3.8.3 upgrade script (only multilingual.php for sitename and sitename_admin).
4. Updating INI settings for multi-language.
5. Clearing the cache.

Admin site working very fine. but the user site giving the error Access denied. When I checked the Roles and Permissions for the anomonous user, the policies are coming like:

Anonymous user login SiteAccess( )

Nothing in SiteAccess.

I also checked other Roles, same thing is happening. I am getting nothing in the SiteAccess.

Is it a bug or do i need to run another update scripts.

Smith

Marcin Drozd

Friday 11 August 2006 4:19:49 am

Hi John
I know this problem. I have had this one after update from 3.5.x to 3.6.x, 3.6.x to 3.6.y, and 3.6.x to 3.7.x but I dont know why. maybe bug in previous eZp versions, hmmm.

http://ez-publish.pl

John Smith

Friday 11 August 2006 6:55:49 am

Hi Drozd,

If this is the bug, then we have to report, At the moment i have some sites running on ezpublish 3.6.1 which needs to be updated to ezpublish 3.6.8. After the upgradation steps i dont want to manually changes the Roles and persmissions for each of the sites, which is totally waste of time and the sites will not work straight way after the upgradation.

Ez Crew, Please help.

Smith

Eivind Marienborg

Wednesday 16 August 2006 8:49:07 am

I'm having similar problems, but am running mysql. The updatemultilingual.php crashes at once after launch, with the following error message:


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

But there is no error message printed.. How do I enable debug, or even better, how do I get around this problem?

I'm upgrading from an 3.6.0 to 3.8.3, on Apache/1.3.34 (Ubuntu) PHP/4.4.2-1build1.

John Smith

Friday 18 August 2006 10:27:06 am

Hi Marienborg,

I am also using MYSQL aswell, but did not solve the problem of empty siteaccess.
Any body from EZ Crew please help.

Smith

Eivind Marienborg

Friday 18 August 2006 10:48:31 am

Hi John :)

Could you describe your problem with the "missing siteaccess" a little more thorough?

John Smith

Saturday 19 August 2006 5:34:20 am

Hi Marienborg,

Thanks for your reply.

I have upgraded ezpublish 3.6.1 to ezpublish 3.8.3 I followed all the steps as instructed by article "Upgrading from 3.6.x (3.7.x) to 3.8.0". All went very well. No errors at all.

The steps which I followed:

1. Upgrading the distribution files to 3.8.3
2. Upgrading the database to 3.8.3
3. Running the 3.8.3 upgrade script (only multilingual.php for sitename and sitename_admin).
4. Updating INI settings for multi-language.
5. Clearing the cache.

Admin site working very fine. but the user site giving the error Access denied. When I checked the Roles and Permissions for the anomonous user, the policies are coming like:

Anonymous user login SiteAccess( )

Nothing in SiteAccess. It is coming empty.

I also checked other policies under Roles and permissions, same thing is happening, getting nothing in the SiteAccess.

Is it a bug or do i need to run another update scripts????

Smith

Eivind Marienborg

Wednesday 23 August 2006 1:15:41 am

This didn't happen to me, so I'm pretty blank on this, unfortunatly. Perhaps someone else have experience with this?

Conor Stapleton

Thursday 16 November 2006 8:15:47 pm

Ive been trying to move site form a server running ezpublish 3.6. I have to use php 4.4 so ive copied the files and followed the upgrade process.

The user site is fine but the admin site is giving me this error :

Fatal error: eZ publish did not finish its request

The execution of eZ publish was abruptly ended, the debug output is present below.

There is no debug information. How can I debug this and find out what is going going wrong.

Conor

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu