search does not work.what's wrong?

whatever I enter,it always displayed :Sorry, no image matches. Try refining your search.sometimes it will give me this error:
Zenphoto Error
MySQL Query ( SELECT DISTINCT `id`,`show`,`title`,`desc`,`albumid`,`filename`,`location`,`city`,`state`,`country` FROM `zp_images` WHERE ((`id`=13533) OR (`id`=13572) OR (`id`=13665)) ORDER BY `date DESC` ) failed. Error: Unknown column 'date DESC' in 'order clause'

I have updated to Ver1.2.1
you can test my web : httP://www.av-fans.com

Comments

  • This is very similar to what I am experiencing. In my test installation I have two albums - one with just 5 photos with title and description from the metadata. The other album has 21 photos with all the metadata I could fill in with Lightroom, including keywords.

    Both albums appear very nice - no errors. Keywords were imported as tags. I was really happy.

    From the main page I use a word from the title of my smaller album (with less metadata) and that album appears in the search results. That's good. But when I search on a word from a title of one of the photos, I get a Sorry, no image matches ....

    Yes, on the options tab I have ensured that title, description, and the rest of the fields are to be searched.

    The problem gets worse. When I search for the larger album using a word from its title, I do get that album returned, but a ZenPhoto SQL error in pink appears below the thumbnail of the album.

    If I go back to my main page and start all over, that is, select the larger album to view, the individual photos appear as expected. Now, if I search on a word in the title of one of the photos, I sometimes get a "sorry, .... But, mostly I get this error:

    Zenphoto Error
    MySQL Query ( SELECT DISTINCT `id`,`show`,`title`,`desc`,`albumid`,`filename`,`location`,`city`,`state`,`country` FROM `zp_images` WHERE ((`id`=58) OR (`id`=35) OR (`id`=37) OR (`id`=38) OR (`id`=39) OR (`id`=40) OR (`id`=51) OR (`id`=52) OR (`id`=53) OR (`id`=54) OR (`id`=55) OR (`id`=56) OR (`id`=57)) ORDER BY id ) failed. Error: Out of memory; restart server and try again (needed 65528 bytes)

    I never get this error on the smaller album with no keywords - I wonder if keywords or tags may be the problem. I'm pretty sure that memory isn't the issue, but I am checking allocation on the apache.

    Any ideas? Thank you.
    I have version
  • Oops, I have version zenphoto version 1.2.1 [2635]
  • I just test ver1.2,that is ok.
    but in ver1.21 will cause error.

    I think that some functions about search must be changed on Ver1.21,because I ues the same theme when I test 1.2 and 1.21.
    but I don't know where changed,

    It seems template-functions.php caused.and you?

    please fix it ,thank you ...
  • Could the problem have something to do with the keywords DISTINCT and ORDER BY? Being a newby, I have not yet found the code that forms the SQL queries. When I do, I will delete DISTINCT and see what happens. Will report what I find.
  • cqboy2003: I ran a search on your site and did not get the failure. Nor can I recreate it on my site. Can you be more specific on what search you were doing?
  • Hi there,

    I just deleted DISTINCT from two queries in class-search.php and all is well - no errors.

    I think that this is an issue with mySQL 5.0.1. I have read that 5.1 beta somehow solves the problem. I do not "do" SQL so I can't explain the problem. Is there an SQL guru out there that can diagnose this? This is not only a Zenphoto issue. Other folks are experiencing this, too.
  • I search the word "AKINA' which is the first album name.but it return :"Sorry, no image matches. Try refining your search."

    When I search the word "sexy" which is a part of a album name ,it return Zenphoto Error"Zenphoto Error
    MySQL Query ( SELECT DISTINCT `id`,`show`,`title`,`desc`,`albumid`,`filename`,`location`,`city`,`state`,`country` FROM `zp_images` WHERE ((`id`=13533) OR (`id`=13572) OR (`id`=13665)) ORDER BY `date DESC` ) failed. Error: Unknown column 'date DESC' in 'order clause'

    sbillard,what word do you search?and it returned right result?
  • Can you try setting your image sort order to `ID` instead of `date` and see if that works? Maybe the problem is that the "date" column is not enclosed in peck marks. If that is the case, then there is a fix in last night's build.
  • I tried,it always cause error or no result.
    It seems not the order to ID or date.
  • acrylian Administrator, Developer
    Try the nightly, the search should work now again.
  • YES, search is ok.but new questions come on
    please visit my web http://www.av-fans.com

    it display some "notie" :Notice: Undefined

    I searched this "notice" and found some way to undisplay it ,
    set in php.ini ,for example:error_reporting = E_ALL & ~E_NOTICE
    ;display_startup_errors = Off;register_globals = On

    but it don't work.

    how to do with it?
  • There are three errors on your page:

    1. `Use of undefined constant ture - assumed 'ture' in /home/content/c/q/b/cqboy2003/html/themes/default/index.php on line 48` appears to be a typographical error in your theme. This line is not in the standard default theme index.php, so you should check your modifications.

    2. `Undefined variable: passwordcheck in /home/content/c/q/b/cqboy2003/html/zp-core/plugins/image_album_statistics.php on line 40` is a NOTICE error that probably should not be being displayed given the reporting of `E_ALL ~ E_NOTICE` but it is easily corrected by adding `$passwordcheck = '';` as the first line of the function.

    3. `Undefined property: Image::$name in /home/content/c/q/b/cqboy2003/html/zp-core/plugins/image_album_statistics.php on line 141` is more of a problem. The code seems to be trying to get the path of an album but the error messages says it is referencing an image object. There is indeed no `name` property to images--it is a property of albums. Maybe Acrylian will have some insite here.
  • well,I modify php.ini
    I add "display_errors = Off",then it doesn't display that notice all.

    but the popular album's thumb can't display,do you have any idea about it?

    visit my web www.av-fans.com to see the error.
  • acrylian Administrator, Developer
    I have no idea currently, sorry.
  • I copy "image_album_statistics.php" of ver1.2 to zp-core/plugin ,it can work.
  • Of course, hiding the errors does not make them go away.
  • how about "the popular album's thumb can't display" ?
  • acrylian Administrator, Developer
    No idea about that yet.
  • I have copy the file of Ver1.2 in my web,it's ok.
  • acrylian Administrator, Developer
    That is a hint. We will check what has changed.
  • flu Member
    Yes !
    I had the same problem with the thumbs of the last updated albums on my index page so I replaced image_album_statistics.php (version 1.2.1) by the one of the version 1.2 and it solved the problem.

    Thank you guys !
Sign In or Register to comment.