[SOLVED] Upgrade error (latest CVS)

robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Mon, 2005-07-11 15:50

Hi,

I attempted an upgrade from CVS today. All seemed to go well until I came to upgrade other modules. Everything seemed to work except the upgrade of the Matrix theme from 0.9.6 to 0.9.8.

I now see the following error when upgrading other modules:

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/apache/robinbowes.com/gallery/gallery2-CVS/upgrade/steps/UpgradeOtherModulesStep.class on line 89

Warning: Invalid argument supplied for foreach() in /home/apache/robinbowes.com/gallery/gallery2-CVS/upgrade/steps/UpgradeOtherModulesStep.class on line 89

I can skip this step and seemingly complete the upgrade, but when I go to my gallery URL I am taken straight to the upgrader again.

Any idea how to fix this?

----

Gallery URL (optional): http://gallery.robinbowes.com
Gallery version: 2.0 beta (latest from CVS as of 16:39 BST 11-Jul-2005
Webserver (with version): Apache, Fedora Core 4 RPM, 2.0.54-10
Datatabase (with version): MySQL 4.1.7
PHP version (eg 4.2.1): Fedora Core 4 RPM, 5.0.4-10.3
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system: FedoraCore 4
Web browser/version: IE6
G1 version (for migration bugs):

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-07-11 16:12

have you changed your G2 in any way? local templates? your own themes, layouts? GalleryCapabilities:: ...?

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Mon, 2005-07-11 22:34
valiant wrote:
have you changed your G2 in any way? local templates? your own themes, layouts? GalleryCapabilities:: ...?

Hi,

Yes, I am/was using the Greymatter theme.

How do I remove this and go back to the default?

R.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-07-11 22:35

after the coremodule upgrade step of the upgrader, remove the all directories in /themes/ but /themes/matrix/
hope that works.

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Tue, 2005-07-12 08:50
valiant wrote:
after the coremodule upgrade step of the upgrader, remove the all directories in /themes/ but /themes/matrix/
hope that works.

I've moved the greymatter directory out of the theme directory, refreshed from CVS, restarted apache and run through the update process again.

I've now got two modules that need upgrading - URL Rewrite and Matrix. If I try and upgrade them I still get the same error. If I skip the upgrade (and continue to step 5), the upgrade appears to complete successfully but when I go to my gallery URL I get taken to the installer again.

Bugger!

R.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Tue, 2005-07-12 14:15

There was a bug in the URL rewrite that's now been fixed. That bug may have still been in CVS when you updated. Try updating CVS one more time. I'd probably clear browser cache and cookies as well just to rule out any problems on the browser side.

If that doesn't work I'd try this. Valiant can come in screaming if this is bad advice ;)

Try this for a clean code base:

0.1) clear you browser cache and GALLERYSID cookies
1) backup .htaccess and config.php
2) delete all other files under your G2 install
3) checkout G2 again
4) restore .htaccess and config.php
5) run through upgrader one more time

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Tue, 2005-07-12 14:39
nivekiam wrote:
There was a bug in the URL rewrite that's now been fixed. That bug may have still been in CVS when you updated. Try updating CVS one more time. I'd probably clear browser cache and cookies as well just to rule out any problems on the browser side.

If that doesn't work I'd try this. Valiant can come in screaming if this is bad advice ;)

Try this for a clean code base:

0.1) clear you browser cache and GALLERYSID cookies
1) backup .htaccess and config.php
2) delete all other files under your G2 install
3) checkout G2 again
4) restore .htaccess and config.php
5) run through upgrader one more time

OK, I did this.

The URL Rewrite module got upgraded OK, but the Matrix module did not.

I still get the same warnings, i.e.:

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/apache/robinbowes.com/gallery/gallery2-CVS/upgrade/steps/UpgradeOtherModulesStep.class on line 89

Warning: Invalid argument supplied for foreach() in /home/apache/robinbowes.com/gallery/gallery2-CVS/upgrade/steps/UpgradeOtherModulesStep.class on line 89

Upgrade Other Modules
Continue to Step 5» 

My gallery URL still takes me to the Installer.

I tried turning on debug ($gallery->setDebug('buffered');
) but got no additional output.

Any further ideas?

R.

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Wed, 2005-07-13 20:56

Hi,

I've just updated from CVS again (21:50 BST, 13/07/05) and re-run the upgrader and all is now working.

I'm not sure what the problem was but it seems to now be fixed!

R.

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Mon, 2005-07-25 10:55

I'm back!

I've just updated from CVS again and am having the same problems updating the theme modules, and also with the upgrader looping.

All goes well until I get to to the "Upgrade Additional Modules" step.

This is what is to be upgraded:

Classic 0.9.6 0.9.3 Classic Gallery2 root album look and feel
Hybrid 0.10.5 0.10.6 Combined album/image/slideshow dynamic view
Matrix 0.9.8 0.9.9 Standard Gallery2 look and feel
Slider 0.10.4 0.10.5 Image viewer/slideshow; subalbums/other items not shown
Tile 0.9.7 0.9.8 Tile view of background image and image thumbnails; subalbums/other items not shown

I'm not sure why "Classic" shows a current version of 0.9.6 and a new version of 0.9.3??

Anyway, when I click "Upgrade Selected Modules" I get the following error:

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/apache/robinbowes.com/gallery/gallery2-CVS/upgrade/steps/UpgradeOtherModulesStep.class on line 90

Warning: Invalid argument supplied for foreach() in /home/apache/robinbowes.com/gallery/gallery2-CVS/upgrade/steps/UpgradeOtherModulesStep.class on line 90

Any ideas what might be causing this (again!) ?

R.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-07-25 11:07

please post a phpinfo link.

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Mon, 2005-07-25 11:13
valiant wrote:
please post a phpinfo link.

http://robinbowes.com/phpinfo.php

(IM me on AIM:robinbowes, or MSN:robin-.net@robinbowes.com if you like)

R.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-07-25 11:19

please try the following:
disable eAccelerator, flush the eAccelerator caches and then restart the webserver.
then try the upgrade again.

we have a note in the README.html that you should this during upgrades.
after the upgrades, you can activate eAccelerator again.

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Mon, 2005-07-25 11:24
valiant wrote:
please try the following:
disable eAccelerator, flush the eAccelerator caches and then restart the webserver.
then try the upgrade again.

we have a note in the README.html that you should this during upgrades.
after the upgrades, you can activate eAccelerator again.

OK, I wasn't aware of that.

I tried it and I still get the same error.

Anything else I should try?

R.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-07-25 12:22

let's debug:

after line 87 in upgrade/steps/UpgradeOtherModulesStep.class
please add this:

var_dump($_REQUEST['theme']);
exit;

and please post the output to the forums (if you post the output from the html source, it's nicely formatted).

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Mon, 2005-07-25 12:30
valiant wrote:
let's debug:

after line 87 in upgrade/steps/UpgradeOtherModulesStep.class
please add this:

var_dump($_REQUEST['theme']);
exit;

and please post the output to the forums (if you post the output from the html source, it's nicely formatted).

Valiant,

The only output I get is;

string(5) "clean"

R.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-07-25 12:40

if possible, please pm me the url and ftp account information suich that i can debug this.
else: we'd do a lot of small steps here via the forum and it takes a while.

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Mon, 2005-07-25 12:48
valiant wrote:
if possible, please pm me the url and ftp account information suich that i can debug this.
else: we'd do a lot of small steps here via the forum and it takes a while.

Sent.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-07-25 12:54

hmm, seems to be fixed?!
just went through the upgrader and it worked.

i have no permissions to disable the config.php debug mode (can't write to the file).

so if you still have a problem, ... let me know and give me write permissions.

and if it's solved, then it was a weird cookie issue. clearing your browser cookies could have solved it.

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Mon, 2005-07-25 13:04
valiant wrote:
hmm, seems to be fixed?!
just went through the upgrader and it worked.

i have no permissions to disable the config.php debug mode (can't write to the file).

so if you still have a problem, ... let me know and give me write permissions.

and if it's solved, then it was a weird cookie issue. clearing your browser cookies could have solved it.

That could well be it - I haven't changed anything else, and you wouldn't have any cookies set when you browsed to the site so I'll put it down as that and remember to clear cookies if I have the same problem again.

Thanks for your help,

R.