Support » Plugin: Better Search Replace » Select all or multiple tables not working

  • Resolved svenm73

    (@svenm73)


    Hi BSR Support,
    although I have selected all or multiple tables to do a search and replace, the plugin only searches one table (the first of the selected). I only did a test run so far. I am using version 1.3 of the plugin.
    Is this normal behavior and I just need to search and replace one table at a time – or is something wrong – or not compatible and I should better not perform an actual search and replace run?
    Thanks and best regards
    Sven

Viewing 3 replies - 1 through 3 (of 3 total)
  • Same here, only first table is searched and mentioned in (test run) results, WP 4.9.1 Multisite, Better Search Replace 1.3.1

    Any suggestions?

    Found the problem, BSR assumes a PHP setting, which was/is different at the test server.

    The returned parameter bsr_data in function process_search_replace() in file includes/class-bsr-ajax.php contained & amp; instead of & as seperator, which sets all args besides the first one (which happens to be the first selected table) in the next step to default values, because the other args were not recognized on server.

    Reason was use of 'bsr_data' => http_build_query( $args ) (more) which internally uses PHP arg_separator.output (more) which was/is set to & amp; on the test server while PHP arg_separator.input was/is set to a different value of & on the test server. These PHP settings can be seen in phpinfo() output at “Core”.

    Quickfix for servers with this setting, in line 177 of above mentioned file replace this:

    'bsr_data' => http_build_query( $args )

    with this:

    'bsr_data' => http_build_query( $args, '', '&' )

    NOTE: Had to add space char in & amp; in explainations due to weird rendering problems in this forum… :-/

    Plugin Author Matt Shaw

    (@mattshaw)

    Thanks for your help tracking this down @svenm73 and @ov3rfly. This should be fixed in the latest version.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.