johngodley / search-regex

Search Regex adds a powerful set of search and replace functions to WordPress that go beyond the standard searching capabilities, with full regex support.
https://searchregex.com
GNU General Public License v3.0
32 stars 9 forks source link

Search Regex Error #168

Closed WellKevin closed 1 month ago

WellKevin commented 1 year ago
Plugin: 3.0.6
WordPress: 6.1.1 (single)
PHP: 7.3.11 512M 1200s
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
JavaScript: https://szx-evershinecpa.cn/wp-content/plugins/search-regex/search-regex.js
REST API: https://szx-evershinecpa.cn/wp-json/
Query: ?page=search-regex.php&searchphrase=T1%0AT2&searchflags%5B%5D=case&searchflags%5B%5D=multi&source%5B%5D=posts&filters=%5B%7B%22type%22%3A%22posts%22%2C%22items%22%3A%5B%7B%22column%22%3A%22post_type%22%2C%22logic%22%3A%22include%22%2C%22values%22%3A%5B%22post%22%2C%22page%22%5D%7D%5D%7D%5D

Action: https://szx-evershinecpa.cn/wp-json/search-regex/v1/search/ POST
Params: {"searchPhrase":"T1\nT2","searchFlags":["case","multi"],"source":["posts"],"replacement":null,"perPage":25,"filters":[{"type":"posts","items":[{"column":"post_type","logic":"include","values":["post","page"]}]}],"view":[],"action":"replace","actionOption":[],"page":0,"searchDirection":"forward"}
Code: 400 Bad Request

Error: Invalid parameter(s): searchFlags (rest_invalid_param)
Raw: {"code":"rest_invalid_param","message":"Invalid parameter(s): searchFlags","data":{"status":400,"params":{"searchFlags":"Invalid search flag detected"},"details":{"searchFlags":{"code":"rest_invalid_param","message":"Invalid search flag detected","data":{"status":400}}}}}
johngodley commented 2 months ago

Can you show a screenshot of your search settings?