Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Unusual error with ImageGallery


Reply


535 Views

Avatar
mrProper

Community Member, 7 Posts

18 August 2012 at 5:00am

Hi all,
I have a simple site with DOM, Uploadify and ImageGallery only - all last trunks. My SS is 2.4.7.
On my test server everything works fine with the gallery - uploading, then attaching images with Uploadify etc.
On the official I got an unusual error - when I try to upload images, the progress bar goes to100% and then I have no attached images but got the error:

ERROR [User Error]: Couldn't run query:
SELECT "File"."ClassName", "File"."Created", "File"."LastEdited", "File"."Name", "File"."Title", "File"."Filename", "File"."Content", "File"."Sort", "File"."ShowInSearch", "File"."SortOrder", "File"."ParentID", "File"."OwnerID", "File"."ID", CASE WHEN "File"."ClassName" IS NOT NULL THEN "File"."ClassName" ELSE 'File' END AS "RecordClassName"
FROM "File"
WHERE ("File"."ID" IN (?78))
ORDER BY "SortOrder" ASC

Unknown column '?78' in 'where clause'
IN GET /admin/EditForm/field/GalleryItems/UploadifyForm/field/UploadedFiles/refresh?SecurityID=bc690f07fb5f6517725859a2dd5c400c612437ef&ctf[GalleryItems][start]=0&ctf[GalleryItems][per_page]=10&ctf[GalleryItems][showall]=0&ctf[GalleryItems][sort]=SortOrder&ctf[GalleryItems][sort_dir]=&ctf[GalleryItems][search]=&ctf[GalleryItems][filter]=AlbumID_2&ctf[GalleryItems][view]=grid&ctf[GalleryItems][imagesize]=100&FileIDs=%EF%BB%BF78
Line 525 in /home/bluewind/public_html/sapphire/core/model/MySQLDatabase.php

Source
======
516:    }
517:    
518:    function databaseError($msg, $errorLevel = E_USER_ERROR) {
519:       // try to extract and format query
520:       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
521:          $formatter = new SQLFormatter();
522:          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
523:       }
524:       
* 525:       user_error($msg, $errorLevel);
526:    }
527:    
528:    /**
529:     * Return a boolean type-formatted string
530:     *
531:     * @param array $values Contains a tokenised list of info about this data type

Trace
=====
<ul>user_error(Couldn't run query:
SELECT "File"."ClassName", "File"."Created", "File"."LastEdited", "File"."Name", "File"."Title", "File"."Filename", "File"."Content", "File"."Sort", "File"."ShowInSearch", "File"."SortOrder", "File"."ParentID", "File"."OwnerID", "File"."ID", CASE WHEN "File"."ClassName" IS NOT NULL THEN "File"."ClassName" ELSE 'File' END AS "RecordClassName"
FROM "File"
WHERE ("File"."ID" IN (?78))
ORDER BY "SortOrder" ASC

Unknown column '?78' in 'where clause',256)
line 525 of MySQLDatabase.php

MySQLDatabase->databaseError(Couldn't run query: SELECT "File"."ClassName", "File"."Created", "File"."LastEdited", "File"."Name", "File"."Title", "File"."Filename", "File"."Content", "File"."Sort", "File"."ShowInSearch", "File"."SortOrder", "File"."ParentID", "File"."OwnerID", "File"."ID", CASE WHEN "File"."ClassName" IS NOT NULL THEN "File"."ClassName" ELSE 'File' END AS "RecordClassName" FROM "File" WHERE ("File"."ID" IN (?78)) ORDER BY "SortOrder" ASC | Unknown column '?78' in 'where clause',256)
line 123 of MySQLDatabase.php

MySQLDatabase->query(SELECT "File"."ClassName", "File"."Created", "File"."LastEdited", "File"."Name", "File"."Title", "File"."Filename", "File"."Content", "File"."Sort", "File"."ShowInSearch", "File"."SortOrder", "File"."ParentID", "File"."OwnerID", "File"."ID", CASE WHEN "File"."ClassName" IS NOT NULL THEN "File"."ClassName" ELSE 'File' END AS "RecordClassName" FROM "File" WHERE ("File"."ID" IN (?78)) ORDER BY "SortOrder" ASC,256)
line 129 of DB.php

DB::query(SELECT "File"."ClassName", "File"."Created", "File"."LastEdited", "File"."Name", "File"."Title", "File"."Filename", "File"."Content", "File"."Sort", "File"."ShowInSearch", "File"."SortOrder", "File"."ParentID", "File"."OwnerID", "File"."ID", CASE WHEN "File"."ClassName" IS NOT NULL THEN "File"."ClassName" ELSE 'File' END AS "RecordClassName" FROM "File" WHERE ("File"."ID" IN (?78)) ORDER BY "SortOrder" ASC,256)
line 404 of SQLQuery.php

SQLQuery->execute()
line 761 of File.php

File->instance_get("File"."ID" IN (?78),,,,DataObjectSet)
line 2714 of DataObject.php

DataObject::get(File,"File"."ID" IN (?78))
line 182 of MultipleFileUploadField.php

MultipleFileUploadField->Files()
line 369 of ViewableData.php

ViewableData->obj(Files,,,1,)
line 411 of ViewableData.php

...........

...........

When I check for image in Store - everything is OK. The image is uploaded, on right place, in the right folder...

Can anybody help?

Peace