• Ian Sackofwits

    (@plantprogrammer)


    Hey, John Godley, thanks for the work for this great plugin.

    I was wondering whether it would be possible to replace a matched row’s content with an empty string, as when I attempt to do so, I get a critical error and it doesn’t allow me to do so.

    What I do that causes the error: I click on the matched content and attempt to put in an empty string in the content text field and then click the blue “Replace” button.

    I’m aiming for more granularity in how I replace content, so I want to replace content row by row.

    I’m using the “Modify Matches” action and using the regex flags with posts content columns.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Godley

    (@johnny5)

    What is the critical error?

    Thread Starter Ian Sackofwits

    (@plantprogrammer)

    This is the error:

    PHP Fatal error:  Uncaught Error: Call to a member function to_json() on bool in redacted/wp-content/plugins/search-regex/includes/action/class-action.php:101
    Stack trace:
    #0 redacted/wp-content/plugins/search-regex/includes/api/route/route-source.php(272): SearchRegex\Action\Action->get_results(Array)
    #1 redacted/wp-includes/rest-api/class-wp-rest-server.php(1143): SearchRegex\Api\Route\Source_Route->saveRow(Object(WP_REST_Request))
    #2 redacted/wp-includes/rest-api/class-wp-rest-server.php(990): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/search-regex/v...', Array, NULL)
    #3 redacted/wp-includes/rest-api/class-wp-rest-server.php(41 in redacted/wp-content/plugins/search-regex/includes/action/class-action.php on line 101
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Replace Matched Search Results Row Content With Empty String’ is closed to new replies.