WordPress.org

Ready to get started?Download WordPress

Forums

WP-Filebase Download Manager
[resolved] No searching possible? (13 posts)

  1. R0b1n
    Member
    Posted 2 years ago #

    When i'm trying to search with the widget, it's not searching for anything, it gets back to the homepage with the usual information, but no search results.

    How is this possible?

    http://wordpress.org/extend/plugins/wp-filebase/

  2. JackSNORK
    Member
    Posted 2 years ago #

    Hello,

    I have the same problem. Worth : I found a solution few month ago, I dont remember how but it was working.

    Salut,
    J'ai le même problème. Le pire est que j'avais trouvé une solution, je ne me souvient plus de la solution.

  3. 70n1
    Member
    Posted 2 years ago #

    I have fixed this...

    In the file wp-content/plugins/wp-filebase/classes/Search.php
    In the function SearchWhereSql, before the line:
    if(empty($s)) return null;

    Add this line:

    ....
    if(empty($s)) {
    			$s = empty($wp_query->query_vars['wpfb_s']) ? (empty($_GET['wpfb_s']) ? null : stripslashes($_GET['wpfb_s'])) : $wp_query->query_vars['wpfb_s'];
    		}
    if(empty($s)) return null;

    Note: the search widtget need to set a default page in WP-Filebase -> Settings -> File Browser

  4. R0b1n
    Member
    Posted 2 years ago #

    That does the trick, thank you for your support.

  5. JackSNORK
    Member
    Posted 2 years ago #

    I am not lucky,

    I had this already

    if(empty($s)) {
    		$s = empty($wp_query->query_vars['s']) ? (empty($_GET['s']) ? null : stripslashes($_GET['s'])) : $wp_query->query_vars['s'];
    		if(empty($s)) return null;

    Should I replace it ?
    I put your code before this but when i lauch Search, i go to the 404 page

  6. 70n1
    Member
    Posted 2 years ago #

    Change this:

    if(empty($s)) {
    		$s = empty($wp_query->query_vars['s']) ? (empty($_GET['s']) ? null : stripslashes($_GET['s'])) : $wp_query->query_vars['s'];
    		if(empty($s)) return null;
    }

    to...

    if(empty($s)) {
    		$s = empty($wp_query->query_vars['s']) ? (empty($_GET['s']) ? null : stripslashes($_GET['s'])) : $wp_query->query_vars['s'];
    		if(empty($s)) {
    			$s = empty($wp_query->query_vars['wpfb_s']) ? (empty($_GET['wpfb_s']) ? null : stripslashes($_GET['wpfb_s'])) : $wp_query->query_vars['wpfb_s'];
    		}
    		if(empty($s)) return null;
    	}
  7. JackSNORK
    Member
    Posted 2 years ago #

    Thanks for your help but it's same result ---> 404

  8. 70n1
    Member
    Posted 2 years ago #

    You need a default page for File Browser:

    The search widget need to set a default page in WP-Filebase -> Settings -> File Browser

    Do you set this?

  9. JackSNORK
    Member
    Posted 2 years ago #

    Yes, I checked again...

    I setted défault page, I checked also this page is working welle with the file browser.

    Search integration is unset

  10. 70n1
    Member
    Posted 2 years ago #

    I have working the search with this modification.
    Check that you have not made ​​a mistake by changing the search.php code (ie, if you left some brace unlocked, etc. ..)

  11. JackSNORK
    Member
    Posted 2 years ago #

    It's strange !!

    All seems correct I didn't modifie te search and the function looks fine :

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    WP-filebase is version 0.2.9.14

  12. JackSNORK
    Member
    Posted 2 years ago #

    Is there trap that I could install in the code to understand why ?

  13. JackSNORK
    Member
    Posted 2 years ago #

    It works now and this is the fit Back...
    I disconnect all the others plugins and specially "No 4O4 Errors"
    Then,I was able to see in the nativ 404 the SQL error displayed. It was about a custom field in wp-filebase.
    I checked in the MySql database... The syntax was wrong when I created a custom fied.
    Due to this the request was wrong.

    Thank's again 70n1 for your help and sorry for my mistake in the custom field. I hope this would help somme one using badly a custom field.

    No 404 Errors cant be use with wp-filebase

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic