user warning: Unknown column 'image_gallery' in 'where clause' query: SELECT vid FROM vocabulary WHERE module=image_gallery in /homepages/43/d208941739/htdocs/includes/database.mysql.inc on line 172.

CommentFileSizeAuthor
#7 watermark.dbquery01.patch629 bytesschnizZzla

Comments

kbahey’s picture

Project: Image watermark » Image
Component: User interface » image_gallery

This is the wrong project.

It has to go into image_gallery, not image watermark.

schnizZzla’s picture

Project: Image » Image watermark
Component: image_gallery » Code
Category: support » bug
Status: Active » Postponed (maintainer needs more info)

Please tell me, when or where did this error occur. Please post the url.

Gonna fix this bug soon.

For now if you want, i suppose to circumvent the problem you only need image gallery module installed and enabled. Also at least one gallery (vocabulary term) should be created.

schnizZzla’s picture

@khalid

I dont know, sorry, i've posted a follow up the same time

schnizZzla’s picture

My Follow up hast overwritten your changes, change it back, if you're sure. But I really think this is connected to a new feature (toggle). Unfortunately flaminhoon did not post enough information...

schnizZzla’s picture

I was right, I've forgotten a simple check...

Without image_gallery installed you get the error when you go to admin/settings/image_watermark.

@flaminhoon
follow my instructions above. If you do not want to install image gallery, you can install it, create the first gallery and then disable it. This is going to create the neccessary db entry to circumvent this problem...

drewish’s picture

Project: Image watermark » Image
Component: Code » image_gallery
Status: Postponed (maintainer needs more info) » Fixed

the error message make it seem like there's a bug in the query. i just checked the current version of image_gallery and it's properly quoted. make sure you're running the latest version.

schnizZzla’s picture

Title: MYSQL Error » Image Gallery toggle causes MYSQL Error, due to missing quotes in db query
Status: Fixed » Reviewed & tested by the community
StatusFileSize
new629 bytes

Here is a patch.

I've made an mistake in code which I ported from image gallery module. Missing quotes around the string messed the query up.

I was not sure about calling the original _image_gallery_get_vid() function, because this function creates a new gallery, when no galleries exist. That isn't neccessary on watermark configuration. So I ported code from image gallery into almost the same function _watermark_get_gallery_vid(), that only gets vids.

schnizZzla’s picture

Title: Image Gallery toggle causes MYSQL Error, due to missing quotes in db query » New Toggle causes MYSQL Error, due to missing quotes in db query
Project: Image » Image watermark
Component: image_gallery » Code

this patch belongs to watermark

kbahey’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in 5.x and HEAD.

schnizZzla’s picture

merci

Anonymous’s picture

Status: Fixed » Closed (fixed)