[SOLVED]Feb 18th CVS Failed to install and took down Gallery

gregradz

Joined: 2004-09-20
Posts: 57
Posted: Sat, 2005-02-19 15:20

I just updated via CVS, went to gallery and the installer started-upgrading from 0.8.14 to 0.8.15 for the core and two modules updated-webcam and random highlight.
Neither module updated sucessfully. First time this has happened. I figured I would worry about them later and continue without upgrading.
Well, now I get a database error "An error has occured interacting with the database"
Error details are as follows:
in file D:\galleries\radzgallery\modules\core\classes\GalleryStorage\DatabaseStorage.class at line 417 (gallerystatus::error)
in file D:\galleries\radzgallery\modules\core\classes\GalleryStorage.class at line 113 (mysqldatabasestorage::loadentities)
in file D:\galleries\radzgallery\modules\core\classes\helpers\GalleryEntityHelper_simple.class at line 89 (gallerystorage::loadentities)
in file D:\galleries\radzgallery\modules\core\classes\GalleryCoreApi.class at line 2121 (galleryentityhelper_simple::loadentitiesbyid)
in file D:\galleries\radzgallery\init.php at line 167 (gallerycoreapi::loadentitiesbyid)
in file D:\galleries\radzgallery\main.php at line 132
in file D:\galleries\radzgallery\main.php at line 46
in file D:\galleries\radzgallery\main.php at line 39

I am unable to get back into the photo albums now, I have rerun the upgrade with no sucess, skipping modules of course.

If an admin wants to run the upgrader to see what happens with the modules (where I suspect the issue came about) and all the error code there, let me know, I will share the password.
Otherwise....
Any ideas?
Cheers
Greg

EDIT-I went through the pages of output when the modules failed and at the bottom there are a handful of errors. I included those in the pdf with this post. From what I can tell, the upgrade of the modules is what failed.
----

Gallery URL (optional):www.radz.net/photos
Gallery version:CVS Feb 19th
Webserver (with version):S2k3 SP1 RC1
Datatabase (with version):MySQL 4
PHP version (eg 4.2.1):4.0.3.8
phpinfo URL (optional):
Graphics Toolkit(s):IM
Operating system:XP
Web browser/version:IE 6

AttachmentSize
g2errors.zip5 KB
 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-02-19 16:45

both modules are failing because they rely on the 0.8.15 core upgrade, which apparently didn't really get installed.. any errors from the core upgrade step?
now, it so happens i forgot to checkin the sql files for this upgrade.. but got them in only about 10 minutes after the code checkin.. is it possible you updated from cvs right in the window of time to not get the full update? to check, see if you have modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql/A_GalleryEntity_1.0.sql

if you don't have it, that explains what happened.. update from cvs again to get it.
if you do have it, i'm not sure what went wrong.
in either case, you'll want to manually apply that file to your database.. replace the PREFIX things with g2_ and g_ appropriately.. then you should be able to go through the upgrader ok.

 
gregradz

Joined: 2004-09-20
Posts: 57
Posted: Sat, 2005-02-19 17:09

Well, when I re-run the upgrade it tells me that 0.8.15 is installed-see jpg
So, I re-did the CVS update and the upgade. Same result.
So, I downloaded a clean version of G2 from CVS into a new directory, copied all those files into my working gallery directory and checked it-still no dice.
Oh yeah, there were no errors in the core upgrade steps.

The time frome from the initial failure and my last update of CVS has been well over 10 minutes and I do have the a_galleryentity_1.0.sql file in the directory you show.
Now then, your last comment about manually applying that file to the DB...uhh...yeah...if it were not for G2, I still would not run MySQl. Having programmed TRS80's to building systems now, I somehow never learned anything about SQl/MySQl...they are magic to me....maybe a bit more instruction, please! :lol:
And yes, I know, I should have DB knowledge if I plan on running things that rquire a DB....hum a few bars and I'll fake it...
Cheers
Greg

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-02-19 17:40

what matters is if you had the sql file when you first ran the upgrader.. once you ran it once then your versions.dat says you have 0.8.15 so it won't apply it later. i can't tell from your description above if you had the file this first time or maybe you got it from a later cvsup.
an easier choice than manual db update: edit your g2data/versions.dat and change it back to 0.8.14. this upgrade only applies this sql file, so in this case this is safe to do. try the upgrader again.
otherwise, run
mysql -u {username} -p {database}
then enter the commands from the sql file.. change DB_TABLE_PREFIX to g2_ and DB_COLUMN_PREFIX to g_, assuming you used those defaults.

 
gregradz

Joined: 2004-09-20
Posts: 57
Posted: Sat, 2005-02-19 17:46

Ok, well, at least now I have a different error-
Security Violation The action you attempted is not permitted.
Back to the Gallery
Error Detail -
Error (ERROR_BAD_PARAMETER):
in file D:\galleries\radzgallery\modules\core\classes\GalleryView.class at line 167 (gallerystatus::error)
in file D:\galleries\radzgallery\main.php at line 105 (galleryview::loadview)
in file D:\galleries\radzgallery\main.php at line 46
in file D:\galleries\radzgallery\main.php at line 39
Cheers
Greg

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-02-19 17:50

"now" after doing what?
and what page are you accessing? it thinks {viewname}.inc doesn't exist for the view you're trying to load.

 
gregradz

Joined: 2004-09-20
Posts: 57
Posted: Sat, 2005-02-19 17:56

Ok, sorry. What I did was change the file to reflect 0.8.14 so the core upgrade would run.
The upgrade reported no errors, it was when I clicked on 'go to my gallery' or whatever the final comment is that I received the error above.
I made a copy of the folder before doing all this and on the second copy, I did replaced all the files with the latest CVS, changed the dat file again and have a different error this time:
Configuration Error: Missing Layout Missing Layout
This album is configured to use the matrix layout, but it is either missing or not activated. To fix this problem you can either choose a new layout for this album or install or activate this layout .
When I click either of the links, to choose a new layout or to activate the module, I get this error;
The action you attempted is not permitted.
Back to the Gallery
Error Detail -
Error (ERROR_PERMISSION_DENIED):
in file D:\galleries\radzgallery\modules\core\classes\helpers\GalleryUserHelper_simple.class at line 68 (gallerystatus::error)
in file D:\galleries\radzgallery\modules\core\classes\GalleryCoreApi.class at line 374 (galleryuserhelper_simple::asserthasitempermission)
in file D:\galleries\radzgallery\modules\core\ItemEdit.inc at line 147 (gallerycoreapi::asserthasitempermission)
in file D:\galleries\radzgallery\modules\core\ItemAdmin.inc at line 153 (itemeditview::loadtemplate)
in file D:\galleries\radzgallery\modules\core\classes\GalleryView.class at line 246 (itemadminview::loadtemplate)
in file D:\galleries\radzgallery\main.php at line 286 (itemadminview::doloadtemplate)
in file D:\galleries\radzgallery\main.php at line 46
in file D:\galleries\radzgallery\main.php at line 39
So, to ease confusion, tell me which one is easier to fix and I will go ahead with it.
This error is not in a secure spot, you are welcome to view it yourself at www.radz.net/photos
Thanks for the help mindless, I appreciate it.
Cheers
Greg

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-02-19 18:02

let's go with the 2nd one.. go directly to www.radz.net/photos/main.php?g2_view=core:UserAdmin&g2_subView=core:UserLogin
and login as admin.. now try your main page again and follow the link for activate or install this layout.

 
gregradz

Joined: 2004-09-20
Posts: 57
Posted: Sat, 2005-02-19 18:06

Ahhh...once again, you are the master. Fixed it. Thanks for the assistance.
Now, I am assuming it would be a good idea to activate/install more than one layout as a way to avoid this error in the future?
Cheers
Greg
p.s. don't forget to mark as solved...

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-02-19 18:13

the system shouldn't let you deactivate your default layout.. not sure what happened there, but the previous upgrade to 0.8.14 was related to layouts...
glad it's working again!