Slideshow of file set -> FATAL ERROR!

Permalink
Hello,
I had a half hour of panic today!
I've added to my homepage a slideshow of a fileset, so that my content editors could add images to the fileset.
When I clicked the Add button after having selected the slideshow parameters it showed a blank page. So I've disabled the production mode to view the error and here it is:
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1] in EXECUTE("SELECT fsf.fID, fv.fvFilename, fv.fvPrefix, fav.value FROM FileSetFiles fsf, FileVersions fv, FileAttributeValues fav WHERE fsf.fsID = 3 AND fsf.fID = fv.fID AND fvIsApproved = 1 AND fav.fID = fv.fID AND fav.fvID = fv.fvID AND fav.fakID = ") ' in /[MY_SITE_PATH]/home/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /[MY_SITE_PATH]/home/concrete/libraries/3rdparty/adodb/adodb.inc.php(1042): adodb_throw('mysql', 'EXECUTE', 1064, 'You have an err...', 'SELECT fsf.fID,...', false, Object(ADODB_mysql)) #1 /[MY_SITE_PATH]/home/concrete/libraries/3rdparty/adodb/adodb.inc.php(1017): ADOConnection->_Execute('SELECT fsf.fID,...', false) #2 /[MY_SITE_PATH]/home/concrete/libraries/3rdparty/adodb/adodb.inc.php(1548 in /[MY_SITE_PATH]/home/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php on line 78


I've entered then a situation where opening the page it showed an error and I had no way of returning back, even from site map in the dashboard I could not remove the last page version!
Then I've managed to remove that damn version from phpmyadmin, and panic arrived again when I created a new version of that page (fatal error again) because there was items left in the FileAttributeValues with the fvID of my old version.
However now the situation seems to be stabilized, but I don't understand why this happened!
I've tried on another page but the result is the same.
I've then tried on my Windows hosting (I use that for debug purpose) and that worked!
Please can you understand something? (and fix that!!!)

energywave
 
dennyv replied on at Permalink Reply
I had the same problem with concrete 5.3.1.1 fresh install on Mac OS X 10.4 with PHP5, MySQL 5.0 and apache 1.3.

Daniele
energywave replied on at Permalink Reply
energywave
I believe that I should. But maybe someone want to talk about this before, maybe the workaround is simple, for example I believe that the problem reside on the end of the query: fav.fakID = " that's where the problem, isn't it?
What is fakID? Can we at least avoid this problem until you fix it?

Thank you (as always :)
andrew replied on at Permalink Reply
andrew
If you go into your file attributes section - do you have a file attribute named "height" ? That is, an attribute with the handle "height" .

The slideshow assumes that you do, and if you don't, you're going to get this error. Oddly enough, this attribute should be created automatically for you.

Did you rename or delete this attribute? Or perhaps it was simply never created for some reason.

Quick fix, go into the file attributes section and add "height" to your file attributes. Make it a "number." In the long term we will try and not assume that it's there (although we do assume it's there in other places - however if it's not I don't believe it breaks in those instances.)
andrew replied on at Permalink Reply
andrew
Hmm, interesting. The code that's retrieving that attribute is not doing it properly. It's looking by _name_ when it should be looking by handle. The handle will always be the same (e.g. "height", in English) but the title might be Height in any language.

I will modify the code so that this attribute is retrieved properly in the slideshow. As a quick fix you might try renaming the name of your height attribute to "Height" (in English) if this is what is causing it.
energywave replied on at Permalink Reply
energywave
Thank you Andrew, in fact I had the two attributes you where expecting: height and width, but their name was localized to "Altezza" and "Larghezza". So I've renamed them to the english names and... now it works correctly! You got it.
Can I localize the names on the next version? It's a low priority thing, just to know... :)
Thank you for your valuable help!