Jump to:

10928 Posts in 2612 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » Unusual error with ImageGallery

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 415 Views
  • mrProper
    Avatar
    Community Member
    7 Posts

    Unusual error with ImageGallery Link to this post

    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

    415 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.