Fatal Error

Permalink Browser Info Environment
Hello, when I installed your add-on I go to make a new sortable gallery block and on the page where it asks to select a file set, it gives this error won't let me add images:

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 ') and fv.fvType = 1 and fvIsApproved = 1 limit 0,0' at line 4] in EXECUTE("SELECT DISTINCT f.fID, u.uName as fvAuthorName FROM Files f INNER JOIN FileVersions fv ON f.fID = fv.fID LEFT JOIN Users u on u.uID = fv.fvAuthorUID left join FileSetFiles fsf0 on fsf0.fID = f.fID left join FileSearchIndexAttributes on (fv.fID = FileSearchIndexAttributes.fID) where 1=1 and fsf0.fsID in () and fv.fvType = 1 and fvIsApproved = 1 limit 0,0 ") ' in /concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /concrete/libraries/3rdparty/adodb/adodb.inc.php(1042): adodb_throw('mysql', 'EXECUTE', 1064, 'You have an err...', 'SELECT DISTINCT...', false, Object(ADODB_mysql)) #1 /home/user/public_html/ in /concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php on line 78

Type: Discussion
Status: New
jackietaferner
View Replies:
jordanlev replied on at Permalink Reply
jordanlev
Hi,
Sorry you are having problems with this. I want to help fix it but I need some more information to get a better idea of what's going on. Can you go to your file manager and see if any of your filesets are empty? Or maybe you have file sets that don't have any image files in them? Can you also check the permissions on those files -- are you logged in as the admin user, or another user?
Finally, can you tell me which version of concrete5 you're running?

Thanks.

-Jordan
jackietaferner replied on at Permalink Reply
jackietaferner
Wow, that was it! I did not have a set created, I thought when I click "go to file manager" it would let me pick loose photos. But I created a set, and all is well! Thank you!
jordanlev replied on at Permalink Reply
jordanlev
I'm glad it's working for you. That does sound like a bug of some kind though, because you're right that if there are no file sets you should just be able to go to the file manager and create some. In fact, I've done this before so I know it works under some conditions.

If at all possible, can you tell me which version of Concrete5 you're using?

Thanks.

-Jordan
jackietaferner replied on at Permalink Reply
jackietaferner
Sure, it's version 5.3.3.1
jackietaferner replied on at Permalink Reply
jackietaferner
One more question... I am creating a gallery, but want to link to the images from elsewhere (like other photos or text links). When I do this, the right/left arrows repeat the same image in lightbox a couple times before proceeding to the rest of the gallery images. Any thoughts?

Example:

<p><a rel="fancybox23" href="/files/cache/479a7cda5e5ea12266e03f46c.jpg"><img src="/index.php/download_file/-/view_inline/4/" alt="newsong-pre.jpg" width="200" height="80" /></a>TITLE OF PROJECT <a rel="fancybox23" href="/files/cache/479a7cda5e5ea12266e03f46c.jpg">gallery</a></p>
jordanlev replied on at Permalink Reply
jordanlev
I'm not sure exactly what you mean. Do you mean that you want to be able to link to the page and have one of the images appear zoomed out automatically? If so, I'm not aware of any way to do this (unfortunately). You can link to the image directly by getting its URL from the file manager, but this will just show the image in a blank page, not in the gallery.

As for the thing about right/left arrows repeating the same image, I'm not sure what you mean by this either -- is this related to linking to a specific image? I don't understand how one could be related to the other, so I would need a little more explanation in order to answer any questions about it.

Thanks.

-Jordan
jackietaferner replied on at Permalink Reply
jackietaferner
In the regular gallery (inside the Fancybox block), when you click the image it shows that image, then the arrows on right and left of the lightbox will proceed to the next image. Like so: Image 1, Image 2, Image 3, etc.

Using the code I pasted above actually works to link to the gallery using text or some other image. I simply link to one of the gallery's existing images and use the correct rel="" attribute for that gallery.

However, when I use my code above, the lightbox opens and clicking the arrows shows that same image 3 times in a row before proceeding to the other images. Like so: Image 1, Image 1, Image 1, Image 2, Image 3, etc.
jordanlev replied on at Permalink Reply
jordanlev
Hmm... so it seems that you're trying to just paste in some code for a lightbox effect? Can you post a link to this on your actual site so I can take a look?
I've never tried to do this before with this addon so I'm not really sure what to tell you.
jordanlev replied on at Permalink Reply
jordanlev
Okay, I understand what is going on now.
You have several copies of the image in various places on your page (some of them aren't visible, but they're there in the HTML source).

The way that the fancybox javascript works is that is looks for every <a> link that has a particular "rel" value (in your example, it's <a href="/path/to/image.jpg" rel="fancybox23">), takes the image that is linked to and includes that in the gallery. Since you have a link to that same image repeated 3 times in the page, fancybox is adding it 3 times to the gallery.

Unfortunately there is no way to make this addon work the way you want it to. It is possible to do what you want, but it will require some javascript coding (and possible a different lightbox effect other than the fancybox -- one where you can manually specify the image paths without relying on that 'rel="..."' thing).

Sorry I don't have an easy answer for you :(
jackietaferner replied on at Permalink Reply
jackietaferner
Thanks Jordan, I will play with it and see if I figure anything out.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.