Link for search result not correct

Issue #883 resolved
Bernhard Kohn created an issue

When I make a search for file contents, I get an overview of the found places. If I click an the link to the file a "404 Not Found" error will be shown.

The following link is provided:


It seems, that the whole repository path of the local repositories is included If I use the following url the found file is shown correctly:


Comments (7)

  1. sai ganguri

    Even my team has been facing the same issue. Our Rhodecode is connected to PostgreSQL database. I just did a search around the database files and it was all good (showing correct repo location). I dont know from where it is taking the wrong location...

    We actually migrated our rhodecode from Ubuntu to SUSE.... Before migration---the repos were under, for example, opt/rhodecode After migration----,for example, /var/opt/rhodecode.... we updated all the files such as production.ini etc. with the new location....But when you use "search" box, it still shows /opt/rhodecode instead of /var/opt/rhodecode....

  2. Marcin Kuzminski repo owner

    yes it's store in rhodecode_ui table under the key = '/', then the index takes the full path, and stores it.

  3. Rohit Sood

    Thanks. In our case, we cloned the production server using the rhodecode-api and created the repo folder under /opt/rhodecode/.

    In the second iteration , the repos folder was cleaned, the repos folder configuration on the console updated to point to /var/opt/rhodecode and the import script re-run.

    The index's however still retained the "/opt/rhodecode" reference when searching as described by sai ganguri above.

    Questions : Do the indexes not get initialized during the import ? Are the index objects also stored in the database ?

  4. Marcin Kuzminski repo owner

    the full path is stored in the whoosh index database, that's why it kept old values. If you run whoosh index with -f it will rebuild the database and take new correct values from rhodecode database.

  5. Marcin Kuzminski repo owner

    in 4.x there's completely new search engine with syntax highliting and support for elastic search, all such problems should be fixed.

    Closing due to ticket being not valid anymore. Please check for current open tickets or to open a new one against latest 4.X releases.

  6. Log in to comment