Update: Solved? 1.6.1a Search/Tags not working

david1pro Member
edited December 2022 in General support

Any thoughts as to what I might be missing. My site seems fine and the tag list populates, but clicking on them brings up the "Sorry, no matches for (search term)" page. Any manual search does the same. I refreshed the database to no avail. All the metadata is there (as can be seen via each image's individual page). I have the exact same site working on my local NAS without issue... I have a very similar site (slight variation to theme) on the same host working without issue as well, so I feel like I just missed a setting with this install.

Search is not password protected and fails whether logged in as master user or not.

Since I can't delete this post: UPDATE... it seems my FTP only uploaded a part of one of my templates (inc_header)... I will update again if I've not fixed it, but feel free to delete this post (as I can not).

Tags:

Comments

  • Grrr, I hate not being able to edit posts after an hour. My fix was not a fix. I was in a rush and thought it was fixed, but I refreshed my NAS copy, not the one live on my host. I still can't figure this out.

  • david1pro Member
    edited December 2022

    I completely re-uploaded the site from my working NAS copy and am still getting the error (initially I had done a fresh install from the 1.6.1a download)

    Here is my error in the error log that I believe is related, but this references a core file I have never altered, so I don't know. Any help is still appreciated:

    WARNING: mysqli::query(): (HY000/3685): Illegal argument to a regular expression. in /home/(mydomain)/zp-core/classes/class-dbmysqli.php on line 69

    mysqli->query called from dbMySQLi->query (class-dbmysqli.php [69])

    from dbMySQLi->queryFullArray (class-dbmysqli.php [114])

    from SearchEngine->searchFieldsAndTags (class-searchengine.php [1097])

    from SearchEngine->getSearchImages (class-searchengine.php [1590])

    from SearchEngine->getImages (class-searchengine.php [1673])

    from SearchEngine->getNumImages (class-searchengine.php [1556])

    from getNumImages (template-functions.php [2113])

    from include (search.php [24])

    from include (index.php [128])

    from index.php [79]

    I can say I have discovered if I only check to search in tags, or if I click a tag link, it will fail. If I search for everything, including tags, it will now work, but it seems to ignore any tag results, but if tags is checked by itself, it fails, or if I click a tag link, it fails.

    IE: If I check tags/title/date/description - and search for the term "Aladdin" which is in one description and 30some tags, I'll get one result, even though tags was checked - it ignores the tags. So the search issue seems to be it is ignoring tags altogether, saying that there are no identified tags, even though the tag list populates correctly and the tags noted on each individual picture page (image.php) shows the correct tags for each image.

    When I go into the databases for the working and non working sites and look at the tags entries, they all seem to be there for both, formatted the same. IE, the database structure looks the same as far as I can tell. One site working, one site not.

  • david1pro Member
    edited December 2022

    OKAY, I found what causes this, finally.

    On my local install, for Tag matching under the search options, I can select all three choices (partial, word, or exact) and each one will work correctly.

    On my host, for Tag matching, if I select "word" it will NOT work. Changing it to partial will work and exact will work (but with exact, for manual typed searches, you do have to be exact), but if I select "word" no results will be found, whether you type a search in manually or simply click a tag link.

    This seems to be a glitch, and I'm not sure why it's a glitch, but moving it to "partial" allows my tag links to work and allows me to search for tags, albeit a bit more loosely than it would if I could select to search tags by "words"

  • acrylian Administrator, Developer

    No idea, I just changed that option on our own site and it seems to work for me. Try clearing the search cache if you have it enabled, that sometimes can cause weird results.

  • I'm not sure how to do this. I see no option for clearing search cache. If you mean under Options/Search> set Cache expiry: Redo search after "0" minutes. I have tried that and it makes no difference. If there is another clear search cache feature, please let me know.

    Otherwise, the workaround of not using "word" for tag searches does work for me.

    Now if I could only figure out why my site crashes as soon as I save my first favorite with the favorites plugin...

    Maybe all these issues are Dreamhost issues...

  • acrylian Administrator, Developer

    Weird… If you set the option on the Search option to 0 it is disabled.

    You need to have the cacheManager enabled to get a button for clearing it on the overview page. For historic reasons that plugin combines reset buttons for various cachees even if those belong to other plugins (this will eventually be changed),

    Now if I could only figure out why my site crashes as soon as I save my first favorite with the favorites plugin...

    That is most likely another issue (unless your host in general does not play well right now…) There should be something in the logs. If you find anything please open a new topic though.

  • david1pro Member
    edited December 2022

    Thanks for the quick response. I missed that plugin. I enabled and cleared search cache manually, then set tag search to "Word" and the search fails still. I pulled the error from the log for you:

    WARNING: mysqli::query(): (HY000/3685): Illegal argument to a regular expression. in /home/(mysite)/zp-core/classes/class-dbmysqli.php on line 69

    mysqli->query called from dbMySQLi->query (class-dbmysqli.php [69])
    from dbMySQLi->queryFullArray (class-dbmysqli.php [114])
    from SearchEngine->searchFieldsAndTags (class-searchengine.php [1097])
    from SearchEngine->getSearchImages (class-searchengine.php [1590])
    from SearchEngine->getImages (class-searchengine.php [1673])
    from SearchEngine->getNumImages (class-searchengine.php [1556])
    from getNumImages (template-functions.php [2113])
    from include (search.php [24])
    from include (index.php [128])
    from index.php [79]

    As for the favorites plugin, I'll post that log in a new post reflective of my 1.6.1a install (it is interesting that the error for both seem to originate with line 69 of class-dbmysqli.php).

  • acrylian Administrator, Developer

    We'll try to take a look. Are you using some special chars like accents in French or similar a lot?

  • david1pro Member
    edited December 2022

    Just the normal characters, as far as I can recall. I can't think of any photo that would have a special accent, even in the exif. I do have many filenames with parentheses () or dashes - , though.

Sign In or Register to comment.