Update of Gallery Core module fails

perl

Joined: 2005-03-14
Posts: 10
Posted: Mon, 2005-03-14 23:06

Greetings,

Trying to upgrade G2 alpha 4 to beta 1 but upgrade process fails in core module update. (Currently installed 0.8.4, New version 0.9.0)

When hitting "Begin Upgrade' I get a 404 file not found. Examination of httpd log file reveals the following:

[Mon Mar 14 18:08:03 2005] [error] [client 192.168.0.4] File does not exist: /var/www/html/photos/upgrade/upgrade

It doesn't look right to me that 'upgrade' should be in the path twice !?

G2 is installed in the 'photos' directory.

Any help or hints are appreciated!

----

Gallery URL (optional):
Gallery version: G2 Alpha 4 trying to upgrade to Beta 1
Webserver (with version): Apache httpd-2.0.52-3
Datatabase (with version): mysql-server-3.23.58-13
PHP version (eg 4.2.1): 4.3.10
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system: Fedora Core 3
Web browser/version: IE6 / Firefox 1.0
G1 version (for migration bugs): N/A

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-03-14 23:45

does the actual "Begin Upgrade" link contain this bad path, or does this link look ok and maybe a redirect is using this bad path?

 
perl

Joined: 2005-03-14
Posts: 10
Posted: Mon, 2005-03-14 23:51

The "Begin Upgrade" link is a javascript submit of the form contained in the webpage:

<form method="post" action="">
<input type="hidden" name="confirm" value="1" />
</form>

action is blank so no direct linkage to the 'upgrade' path in the request. I am guessing that is introduced in the upgrade/index.php that processes the upgrade form, but good question.

 
perl

Joined: 2005-03-14
Posts: 10
Posted: Tue, 2005-03-15 00:49

I did some more digging around and it does look like it is the actually core update that fails.

This statement in UpgradeCoreModuleStep.class is what causes the request to the malfunctioned URL:

$ret = $core->installOrUpgrade(true);

I started looking at the installOrUpgrade function in GalleryModule.class, but that goes beyond my knowledge about how Gallery 2 all works.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-03-15 02:26

ah, that tells me where the redirect comes from, but it should not occur when you're already in the upgrader.
edit your modules/core/classes/helpers/GalleryPluginHelper_simple.class file and look for 'Location: upgrade/'
just before this line put:
print_r(debug_backtrace());
and try again.. post the trace here.

 
perl

Joined: 2005-03-14
Posts: 10
Posted: Tue, 2005-03-15 02:36

I finally tracked the problem down to the 0.8.13 to 0.8.14 upgrade case in CoreModuleExtras.inc which deals with layout versioning, so after all the digging around it turns out that the problem was caused by a bad layout. The layout I was using was one I had downloaded from this forum. I guess it didn't fully follow the G2 standard for layouts.

mindless, thanks for your help in trying to resolve this problem. I have to say that I really like the code that I have been looking at. It is very well organized. You guys are doing an awesome job.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-03-15 05:25

thanks, perl!
and now we'll know what to look for if we hear of upgrade/upgrade again.. nice work.