View Revisions: Issue #550

Summary 0000550: added missing link path normalization
Revision 2019-11-09 08:34 by administrator
Description Both action use the LIKE statement but {{search}} fails with a starting slash (/).

AND (a.tag LIKE 'Doc/Russian/%' ...)

HERE is WHY:
In the search action it does not normalize the tag which is done in the
unwrap_link() function.

$page -> unwrap_link() -> $tag

It checks for relative and absolute link and resolves them to the correct tag.
For relative links it uses the $this->tag and for included pages the
$this->context[] array to determine the correct tag. The tag starts always
without a slash, like it is stored in the tag field in the database.

I suggest we use in the action the $page parameter and after normalization the
$tag parameter and NOT $for, $root and others, so it is consistent.
Revision 2019-11-09 07:14 by administrator
Description Both action use the LIKE statement but {{search}} fails with a starting slash (/).

AND (a.tag LIKE 'Doc/Russian/%' ...)

HERE is WHY:
In the search action it does not normalize the tag which is done in the
unwrap_link() function.

$page -> unwrap_link() -> $tag

It checks for relative and absolute link and resolves them to the correct tag.
For relative links it uses the $this->tag and for included pages the
$this->context[] array to determine the correct tag. The tag starts always
without a slash, like it is stored in the tag field in the database.