ZenPhoto - 1.4.2 [8956] - Garland theme.
I'm getting this error when I search the site...
http://content.screencast.com/users/n20capri/folders/Default/media/981a5683-9ced-432b-aae4-b4521a6f1378/searcherror.JPGBUT, I only get it when I search for something ("butter" for example) on a category page (Chicken, Beef, Pasta etc.) or a or sub-category page (Sides/Potatoes, Salads) If I search for butter on the home page - it returns 4 results. If I search for butter on the All Recipes page (formerly All news) it returns 4 results. If I search for butter on the actual recipe page (news article page) it returns 4 results. Even searching for butter on the search page works fine. Searching for butter on the album index page works too but it doesn't return any results...I guess because there are no images yet. Archive view and contact us work fine too...
http://recipes.mikemartinelli.com/I have slightly modified the theme with the word "recipe" to replace the word "news" in a few spots but it has the same error with the out of the box Garland theme. The search word doesn't matter - I just used butter as an example. Install and setup went smooth as usual...never had this issue before and I've done a ton of ZenPhoto installs/sites.
Any insight on this issue?
Thanks,
Mike
Comments
Backtrace: fatal zp_error:MySQL Query ( SELECT DISTINCT `news_id` FROM `_news2cat` WHERE ) failed. MySQL returned the 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 '' at line 1
zp_error called
from query (functions-db-MySQL.php [74])
from query_full_array (functions-db-MySQL.php [107])
from SearchEngine->subsetNewsCategories (class-search.php [679])
from SearchEngine->searchFieldsAndTags (class-search.php [1033])
from SearchEngine->getSearchNews (class-search.php [1482])
from getNumNews (zenpage-template-functions.php [204])
from include (search.php [36])
from index.php [128]
Please let us know the answer.
And as seen on the backend...
http://content.screencast.com/users/n20capri/folders/Default/media/9cebce2b-f09f-45cf-a7ce-4395d6598ee6/Cats.JPG
http://content.screencast.com/users/n20capri/folders/Default/media/12ba5f38-1b77-4e07-a77a-03b096be7364/cat2.JPG
Coke, or Cars or Ugly or Bob - they aren't anywhere in any recipe so it doesn't find them and doesn't error.
So in short, if the word is available it errors - if the word is NOT it doesn't...so it's not just "butter".
Not sure if this will help with the issue or not but it's what I just came up with! lol.
One other thing...when I'm on the album index and search - it won't return anything on "news" or "pages" - not sure if it was meant that way or not...
I'd prefer if when searching on an album page (or any page for that matter) that it returns any page, news, album or image with that keyword...
Just a though...
Thanks again,
Mike
Thanks
Choose the trunk version (not the development)
You will have to wait until the latest nightly is generated.
(each day at 11 PM Pacific Standard Time)
You can change this if you want--be sure you do it in a copy of the theme. All this is setup in the beginning of the sidebar.php script.