Search not working on my site

Search is no longer working for me (at all, does not return anything). I am not sure when this started happening. But I presume sometime after 1.6. I get "Sorry, no matches found. Try refining your search." no matter what I enter. When I load archive view I can see all my tagged photos sorted by tag, and or date. I get results like this for dates "58 Hits for December 2022". The index is there but is not returning the search. There are also no errors in log.

*search is configured to search all.

Tags:

Comments

  • acrylian Administrator, Developer
    edited June 2023

    Did you clear the search cache or disable it?
    Everything published? Search setting for fields set correctly?

    On our site search is working with 1.6.

  • Sorry,..... I see it is working on my local host. It must be a security setting. I'll figure it out.

  • FYI: I had turned "mod rewrite" off in Options>>General and it obstructs the search capability.

  • acrylian Administrator, Developer

    That is weird because search should work with both. Anyway, there will be updates in this area with the coming 1.6.1 release (e.g. fixing the broken frontend searchfields selector).

  • RM25 Member

    I got also the same problem with the search tool on my local Zenphoto 1.6 working with php7.4. But after updating and reinstalling, I have understood that it cames from the symlink on "albums" (the folder in zenphoto containing the photos of the Galerie).
    Actually, with Zenphoto 1.6 and php7.4, it is possible to have a symlink for the folder albums to a local folder out of the webroot, without any trouble, but the search tool doesn't work and return always "Sorry, no match found".
    With Zenphoto 1.6 and php8.2, symlink doesn't work anymore!

  • acrylian Administrator, Developer
    edited July 2023

    Zenphoto actually does not use symlinks on the "albums" folder or individual albums at all. We use symlinks if available for not creating cache/resizes image versions if the original is already the same size as requested or has lower quality so nothing is upscaled (unless upscaling is enabled specifially).

    Actually, with Zenphoto 1.6 and php7.4, it is possible to have a symlink for the folder albums to a local folder out of the webroot, without any trouble,

    If you like to use an "albums" folder outside the web root (or with another name), you actually define that via the config file. That is not using a symlink then. Please try that instead.

  • RM25 Member

    Symlink is actually not important for me. I was working with symlink with Piwigo but I don't like Piwigo and I prefere so much and so far the working process of Zenphoto.

    By curiosity, I have tried to modify the config file in /var/www/zenphoto/zp-data/zenphoto.cfg.php (editing the variables $conf['album_folder'] and $conf['album_folder_class'] with priorities 777 on my external folder) but it doesn't work; the setup.php always tell me "Error! You must create the folder".

    Thanks again for your help.

  • acrylian Administrator, Developer

    If you point setup to a "different" "albums" folder it must exist in that location.

    For outside/above the webpath the config would look like this:

    $conf['album_folder'] = 'here-the-full-serverpath/albums/';
    $conf['album_folder_class'] = 'external';
    

    Note that it must be on the same server as Zenphoto. Real external albums folders on different servers/domains etc are not supported because Zenphoto's gallery is file system based.

  • I got also the same problem with the search tool on my local Zenphoto 1.6 working with php 8.0.29.
    New installation.
    2 albums, 58 images with tags, descriptions and titles.
    Search behavior settings OK.
    Default search : New
    Cache expiry : Redo search after 0 minutes.
    Message : Sorry, no matches found. Try refining your search.

    Thanks for your help.

  • acrylian Administrator, Developer

    Are the albums and images actually published? Any errors?

  • Albums published, images published.
    Gallery private or public : idem
    User connected or not connected : idem

    Errors on upload : {38033:Mon, 31 Jul 2023 21:06:46 GMT} Zenphoto v1.6

    WARNING: Cannot modify header information - headers already sent by (output started at /home/haliimyn/public_html/zenphoto/zp-core/zp-extensions/uploader_jQuery/class-uploadhandler.php:1210) in /home/haliimyn/public_html/zenphoto/zp-core/zp-extensions/uploader_jQuery/uploader.php on line 61

    (and lines 62 to 64).

  • acrylian Administrator, Developer

    That upload issue surely has nothing to do with the search results itself. If I recall right that is an issue we fix in 1.6.1a being in development already (not recommend to use yet as it is being worked on).

    Did you check the search options that really fields to search are enabled and also search results for albums anad images? That all should be set by default but if not for unknown reason the search would of course be empty.

  • OK.
    Removed ZenPhoto (installed by Softaculous on a server managed with CPanel).
    Manual installation strictly following your instructions.
    Upload of 25 images. Checking the options we have already talked about.
    Same problem...
    Message : Sorry, no matches found. Try refining your search.

    What to do now ?

  • In desperation, I applied tplowe56's solution (june25) :turned "mod rewrite" on in Options>>General.
    And, indeed, the search (re) works...

  • acrylian Administrator, Developer

    Okay, weird, we will look into the non-modrewrite issue. But nowadays using modrewrite is and should be the standard generally ;-) And I admit we primarily test modrewrite as well.

  • acrylian Administrator, Developer

    Indeed in 1.6 search is broken without modrewrite. This is fixed in the 1.6.1a already so will be fixed with the next update. Also the search field selector on the search form that is also broken in 1.6 will be fixed.

  • Thanks.

  • Firstly, I would like to appreciate the great work and knowledge that has been put into Zenphoto so far. Thank you very much for that.
    I'm running zwo sites with sports photos: EMPEPRESS and Sportives. Both with Zenphoto 1.5.9. each with a slightly modified zpmobile theme and php 7.x.

    When testing for version 1.6 (and php 8.x) I found an additional issue to the one described in

    If the search results are a mixture of pages, news, albums or images, not all results are displayed completely on one page, although there is still space. I found:

    • Only the first album is displayed
    • If there are images after albums, only the first one is displayed, the others on a new page

    I did not run any further tests. Sorry, cannot turn on mod_rewrite.
    I hope this will be corrected in V1.6.1 too. Do you have any prediction for the release date?
    Kind regards, imagepet

  • acrylian Administrator, Developer
    edited December 2023

    You should have tested 1.6.1b already! Other than the forum post you referenced we are no aware of any issues related to search.

    But in 1.6 the pagination behaviour for transition pages - when albums and images share a page - changed in generaly for serach and album pages. You need to update your theme options regarding that. In this area nothing changes in 1.6.1 actually.

    Otherwise, we are actually about to release 1.6.1.

  • imagepet Member

    Upgrade to 1.6.2 shows the same behavior. But acrylian is right: update of the theme options helps to change the behavior.

Sign In or Register to comment.