Version: 2.9.2 Reporter: Derek Hogue —
This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report
When using a template route (rather than a template path) as the “result_page” parameter of a search form, the result page returns “The action you have requested is invalid” error.
Looking at the search module code, the cached search query is fetched by looking at ee()->uri->query_string, which in the case of a template route is the entire series of segments, rather only the last segment, so the search module is looking up the cached query based on the first segment (i.e. “search”, or whatever your template route specifies), rather than the search ID hash.
This also affects {exp:search:keywords}.
In mod.search.php, change all instances of:
$search_id = substr(ee()->uri->query_string, 0, 32);
And also:
$qstring = explode('/', ee()->uri->query_string);
$search_id = trim($qstring[0]);
To:
if(!empty(ee()->TMPL->template_route_vars))
{
$search_id = substr(end(ee()->TMPL->template_route_vars), 0, 32);
}
else
{
$search_id = substr(ee()->uri->query_string, 0, 32);
}
ExpressionEngine implements Markdown Extra and BBCode. Please see the Markdown Extra docs and the BBCode Wikipedia article for a full reference.
**bold**
, __bold__
, *italics*
, _italics_
, ~strike/del~
, `code()`
bold, italics, strike/del, code()
Link: [link title](https://example.com)
Image: ![alt text](https://example.com/image.jpg)
[blockquote]...[/blockquote]
, [quote]...[/quote]
, and Markdown style:
> Some quoted text. > > This is all one quote.
[code]...[/code]
, and you can also specify the language for syntax highlighting, [code=php]...[/code]
GitHub flavored Markdown code fences are also supported:
``` public function decoderRing($str) { return str_rot13($str); } ```