[SOLVED] Maintenance module error -- Fresh CVS update

nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Sat, 2005-05-21 15:56

After a fresh update from CVS I can't get into the Maintenance module or upload from the local server.

After I got the errors I flushed the cache and the templates from the test harness, but still get the errors.

Steps to recreate:
Maintenance error
SiteAdmin > Maintenance

Upload from local server
1) Go to a sub-album (Third Beach in my case)
2) Click Add Items
3) Select From Local Server
4) Select upload directory
5) Click Find Files
6) Select file and click Add Files

I also get this error when trying to upload From Local ServerNotice: Undefined variable: itemIds in /usr/www/users/account/sitefiles/gallery2/modules/core/CreateThumbnailOption.inc on line 67

Attached is the debug logs for the Maintenance module error and the error when trying to upload a local file.

I can also PM a temporary admin user and password to one of you dev guys.

----

Gallery url: http://photos.kevinnehls.com/
Gallery version: 2.0-beta-3+
PHP version: 4.3.10 apache
Webserver: Apache/1.3.29
Database: mysqlt 4.0.18-log
Toolkits: ImageMagick, SquareThumb, NetPBM, Gd
Operating system: FreeBSD server.name.com 4.8-STABLE FreeBSD 4.8-STABLE #0: Thu Apr i386
Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

AttachmentSize
debuglog_uploadLocalFile.txt73.71 KB
 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Sat, 2005-05-21 15:58

I guess I should state I updated from CVS about 8:30am PST this morning (5/21/2005)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-05-21 16:00

cvs updated 2 hours ago, maintenance still works, didn't test the other thing.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-05-21 16:32

i don't see either problem..please let us know if you can reproduce these from a clean install.. also, you posted debug output for accessing maintenance, but didn't mention what actual error you saw (php error/warning? G2 stack trace?)

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Sat, 2005-05-21 17:12

Clean install, still get the same errors. I noticed that for the maintenance module it starts erroring out trying to access the sanitize captions module I had previously installed. I re-installed it and all works well. That was a stupid mistake on my end.

However, I still get an error when trying to upload a local file. Here is the error message:

 Error (ERROR_BAD_PARAMETER)

    * in modules/core/classes/helpers/GalleryDerivativeHelper_medium.class at line 48 (gallerystatus::error)
    * in modules/core/classes/GalleryCoreApi.class at line 880 (galleryderivativehelper_medium::fetchthumbnailsbyitemids)
    * in modules/core/CreateThumbnailOption.inc at line 67 (gallerycoreapi::fetchthumbnailsbyitemids)
    * in modules/core/ItemAdd.inc at line 142 (createthumbnailoption::handlerequestafteradd)
    * in main.php at line 182 (itemaddcontroller::handlerequest)
    * in main.php at line 86
    * in main.php at line 77

There's also this error message right at the top of the page:Notice: Undefined variable: itemIds in /usr/www/users/account/sitefiles/gallery2/modules/core/CreateThumbnailOption.inc on line 67

I don't have any other custom modules or other customizations anywhere in my install at the moment, just that extra maintenance module from here, http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=29642&postdays=0&postorder=asc&start=0

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2005-05-21 20:36

both the G2 and php error indicate CreateThumbnailOption was called with no items.. ie, nothing was added and CreateThumbnailOption didn't handle that very well. That's probably a bug, but not the root cause of the problem here.
Try adding with create thumbnail not checked... now what happens? Any ideas why no items were added? maybe flush templates in admin maintenance for good measure..
do you have quota module active?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Sat, 2005-05-21 20:48

Um, let's chalk this one up to another stupid mistake. Thanks for your help you led me in the right direction. I had just uploaded some zip files and tried adding those straight to Gallery. I'd forgotten that I need to unzip them first.

Would it be possible to have the "From Local Server" option check if a file is a zip file and extract the files if it can? If not, how about a friendlier message? There's nothing stating which files are supported. Just a check box. Maybe highlighting files that aren't supported in red or something and/or having the word "unsupported file" next to each unsupported file.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-05-22 06:26

can you explain a bit more what you're talking about? i'm guessing a module that rejects uploads that are not approved mime types? so that is how the upload completed and no items were added?

if you activate archiveupload module then the contents of zip files are extracted.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Sun, 2005-05-22 20:21

Here are the results I found after a bit of testing.

Zip file with images at the "root" of the zip file upload without any problems.

Zip files with images buried inside a directory within the zip file generate this error. However, if there are images also at the "root" of a zip file that has images buried inside a directory, then only those files at the "root" are uploaded. It didn't matter if the directories had spaces in them or not.

If you have more than one zip file selected, only images found at the "root" are uploaded. If no zip file selected has images at the "root" then the above error occurs.

I also found that when uploading through the "From Local Server" option checking or unchecking the (Un)check all known types check box does not select nor deselect zip files.

I ran the same tests using the "From Web Browser" option and got the same results.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-05-22 20:26
nivekiam wrote:
Here are the results I found after a bit of testing.

Zip file with images at the "root" of the zip file upload without any problems.

Zip files with images buried inside a directory within the zip file generate this error. However, if there are images also at the "root" of a zip file that has images buried inside a directory, then only those files at the "root" are uploaded. It didn't matter if the directories had spaces in them or not.

that's a known issue.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Sun, 2005-05-22 20:42

Thanks for the info. Good to know it'll get taken care of. I'll mark this topic as SOLVED.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-05-22 21:06

created an RFE and added it to the feature matrix... at least it's now a known "known issue" :)
http://sourceforge.net/tracker/index.php?func=detail&aid=1206678&group_id=7130&atid=357130