MySQL error when adding new galleries

Ever since creating a particular album on my server, I have been having enormous trouble removing a "broken" SQL link to a query and therefore can't upload new albums without seeing the same error message.

First of all, my ZenPhoto installation was created via SimpleScripts (through a webhost) so I'm not particularly familiar with manual installation jargon. My cluey partner was able to use MySQL Query Browser to hunt down the TABLE in question, but as the error message references a Query, we have been unable to locate the query in order to delete it.

The error message is:

MySQL Query ( SELECT `id` FROM `tags` WHERE `name`='Nicole O'Sullivan Jamie Dylan Family Portrait Gawle' ) Failed. Error: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 'Jamie Dylan Family Portrait Gawle'' at line 1

We both suspect the apostrophe in O'Sullivan has killed it, but obviously we can't figure out where to delete it.

In as much of a nutshell as I can manage:

(1) I created this original album, but it obviously failed straight away.
(2) I tried to delete the album through the Edit section of the toolbox, but couldn't. So I tried delete the folder in 'albums' on my FTP server.
(3) I tried creating new albums (with slightly different folder names) and eliminating keywords. I did this several times, re-uploading the images (with different filenames) on each occasion. Still no avail. N.B: Occasionally I would refresh the album view page and it would appear to be fixed, but then the SQL error would come back.
(4) I emptied the cache on my FTP server, and deleted the folders completely from the albums folder.
(5) Created a new folder on FTP server and, even using the EXACT same name as the first album that was created (and failed), I was able to refresh the album view and see the folder there with no problem. At the time, this folder was empty.
(6) The same SQL error (referencing the ORIGINAL album, complete with keywords which hadn't been included since) appeared only AFTER uploading images to this folder.

We are completely stuck now and just need some advice. Has anyone had this particular issue before, or can anyone tell us how to access the actual queries in order to delete it? As a last resort, I am happy to scrub the whole system and reinstall - but only if pushed through lack of solution!

Thanks for your help.

Comments

  • You have not indicated what version of zenphoto you have installed. That may be a crutial bit of information.

    It would also be useful to know a bit more about the circumstances where this message occurs--what exactly were you doing at the time?
  • It's ZenPhoto 1.1.7 [1842]

    The error appears when I go to do one of the following things:

    [1] If I go to the 'Edit' tab in zenphoto admin.
    [2] If I go to the actual front-end album pages.

    With some experimentation I have discovered that uploading these particular images seem to break the album and cause the SQL to reference the ORIGINAL query, thus resulting in the error. Uploading any other images (including images already used in other albums) do not cause the error.

    I've cleared my cache which hasn't helped.

    Thanks for your response!
  • Perhaps these images have IPTC Keywords with these apostrophies in them. Anyway, Not much we will do about versin 1.1.7. You could give version 1.2.1, or better yet, the nightly build a try and see if that still has the problem.
  • Thanks for your advice. Given that I've set ZP using SimpleScripts and not manually, can you upgrade the version without wiping all my existing galleries?
  • As luck would have it, SimpleScripts sent me an email this morning to say that a new ZP upgrade was now supported through their system. This upgrade has fixed my problem! Thanks for raising the suggestion.
Sign In or Register to comment.