Forums

Search does not work at all! (23 posts)

  1. indigo diingo
    Member
    Posted 3 years ago #

    Hello

    I hope somebody can help me because there is very little information to find about this error and it's a huge problem.

    I installed WordPress about a month ago. For a while everything went well but then out of a sudden, the search function decided to stop working. I made a new theme and applied it to my existing content and gues what, it worked again. For one day! Now it's still broken and there is nog logical reason for it because i haven't made changes to the theme.

    I have tried plugins but it wont work. My site is at http://www.fotocursus.dadu.be/

    Is there somebody who is wiser then me about this topic and can help me out?

    Greetings,
    Indigo

  2. webjunk
    Member
    Posted 3 years ago #

    Don't even see a Search on your site so can't tell.

  3. indigo diingo
    Member
    Posted 3 years ago #

    It is the magenta frame on top of the sidebar.

  4. tamilsweet
    Member
    Posted 3 years ago #

    You have the wordpress installation under a sub-directory /wordpress/
    But the search form is

    <form method="get" action="http://www.fotocursus.dadu.be/">
    <div>
    	<input class="zoekvak" type="text" value="" name="s" id="s" size="15" />
    	<input class="zoek" type="submit" id="searchsubmit" value="" />
    </div>
    </form>

    Either update your form action to
    http://www.fotocursus.dadu.be/wordpress/

    or use a htaccess rule to redirect the request.

  5. indigo diingo
    Member
    Posted 3 years ago #

    I've tried the http://www.dadu.be/wordpress/ but it doesn't work either. Besides I have already a htaccess file that redirects http://www.fotocursus.dadu.be/wordpress/ to http://www.fotocursus.dadu.be/

  6. tamilsweet
    Member
    Posted 3 years ago #

    Can you paste the content of your htaccess file here.

  7. indigo diingo
    Member
    Posted 3 years ago #

    Yeah, here you are

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>

    # END WordPress

  8. tamilsweet
    Member
    Posted 3 years ago #

    No, the htaccess file in the root directory that redirects / to wordpress/

  9. indigo diingo
    Member
    Posted 3 years ago #

    Strangely enough, those are exactly the same

    This is my structure:

    Fotocursus (root dir)
    - wordpress
    -- wp-admin
    -- wp-content
    -- wp-includes
    -- .htaccess
    - .htaccess

  10. tamilsweet
    Member
    Posted 3 years ago #

    Check
    RewriteBase /wordpress/
    I'm sure that would be different.

    might be
    RewriteBase /
    in root dir

    !?

  11. indigo diingo
    Member
    Posted 3 years ago #

    Root:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>

    # END WordPress

    WordPress dir:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>

    # END WordPress

    So this is not supposed to be the same?

    Thanks for the help till now!

  12. tamilsweet
    Member
    Posted 3 years ago #

    Ok.
    Do you have something in the /index.php like (index.php in root dir)
    require('./blog/wp-blog-header.php');

  13. webjunk
    Member
    Posted 3 years ago #

    Tamil got it correct. It appears rewrite the URL is causing the issue. Looks like it works if you manually try the search with adding the wordpress directory to the URL.
    The ReWriteBase is correct for both. It is setting /wordpress as the root URL. That is what rewritebase is for.
    Is there a reason why you are doing that? That could mess with other things than just search. Would more recommend moving wordpress to the root URL and getting rid of the rewritebase. There are directions to do this in the DOCS area. I don't see you doing any of the things that would require rewritebase.
    Changing the search link might not work because after the search is executed it is rewriting the URL.

  14. indigo diingo
    Member
    Posted 3 years ago #

    Yes, it's called index.php and is the same in the root dir as wel as in the wordpress dir.

    This it the complete content from index.php:

    <?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define('WP_USE_THEMES', true);

    /** Loads the WordPress Environment and Template */
    //require('./wp-blog-header.php');
    require('./wordpress/wp-blog-header.php');
    ?>

    I also have a problem when i login, wordpress redirects me then to a not fout page of my blog instead of the admin dashboard. This problem is not to serious because it doesn't actually brake the blog. I just tell you this in case it's related to the search problem.

  15. tamilsweet
    Member
    Posted 3 years ago #

    Can you check the urls of,
    WordPress address (URL) and Blog address (URL)
    You can find them under WordPress Admin. Settings >> General

    WordPress address should be http://www.fotocursus.dadu.be/wordpress/
    Blog address should be http://www.fotocursus.dadu.be/

  16. indigo diingo
    Member
    Posted 3 years ago #

    yeah, they are like u suggested with the only small difference that when I save them, WordPress automatically removes the backslash at the end of the url.

  17. indigo diingo
    Member
    Posted 3 years ago #

    So i better just ignore this and offer my visitors no search options?
    It seems that this is a general wordpress bug because there are other forum treads describing the exact same problem and they never got solved. Am I just the next one in the "never got solved" list?

  18. breakingranks
    Member
    Posted 3 years ago #

    My search box stopped working after I upgraded to 2.7.1, and for now I put a Google Search Box in its place.

    I wish some of the search-related plug-ins like Search Anything would also offer code to place a new box. :-/

  19. webjunk
    Member
    Posted 3 years ago #

    Indigo your search should work. Not sure why you have an index.php in your root. Try renaming it and check what happens. Should not even be used since you are rewriting the URL. But I think as Tamil had said having WP in a sub-directory and the rewritebase is screwing the serach and probably other things. But if you have reasons for such a kludgy setup guess you will have to deal with the issues it causes.

  20. indigo diingo
    Member
    Posted 2 years ago #

    A kludgy setup? Isnt the wordpress function for selecting a different map to use as the site root not a kludgy one then?

    My one reason for this setup is to keep things structured.

    So is there a solution (maybe paid?) or is it just a big bug?

  21. webjunk
    Member
    Posted 2 years ago #

    What I meant is if you wanted it to be the root of the site you should have WP installed in the root of the site. Its Kludgy to put something in a subdirectory and then remap. Kludgy=making nmore complicated than needed. Sorry.

  22. indigo diingo
    Member
    Posted 2 years ago #

    I understand but i have no other choice if i want to keep things structured in my root folder because in the future i wanna add some non wordpress pages and then it becomes all a mess.

    Does anybody knows where i can submit this bug to the bug list?

  23. indigo diingo
    Member
    Posted 2 years ago #

    Well, is there a place where i can report this very important bug because my website has been up and running now and with a lot more visitors a day then in the beginning it's ridiculous to have no search option and some visitors start sending me emails about this bug. Should i need to hire a professional IT specialist to solve this problem?

Topic Closed

This topic has been closed to new replies.

About this Topic