This is a static dump of issues in the old "Flyspray" bugtracker for DokuWiki. Bugs and feature requests
are now tracked at the issue tracker at Github.
Open
This task was never closed in our old bug tracker.
Feel free to open a new task at Github if you feel this is still relevant.
FS#2308 Namespace-dependent plugins and features break on a search
other
2011-08-15zioth
The search function overloads the "id" parameter, making it very difficult to know what page or namespace you came from. This isn't normally a problem, but in some wikis (like mine) each namespace has its own behavior. For example:
- Search is limited to the current namespace (using the nssearch plugin).
- Some namespaces have their own skin (using the loadskin plugin).
- Sidebar navigation lists the current namespace's pages (using the vector template and the indexmenu plugin).
The later two features break during a search, since all searches happen in global scope. The only reason the first feature works is that nssearch figures out the namespace from the breadcrumbs.
Solution: Stop overloading the id parameter:
- doku.php?id=myns:mypage&do=search&search=find%20me
2011-08-18Michitux
The idea of using the id is also that you can create new pages with the name of the search words by clicking on the "create page"-button on the search result page. This won't work anymore with the proposed change.
2011-08-18zioth
Good point. This can still be fixed by adding another parameter:
- $ID would be set to the page this search came from.
- The Create Page link would use the new parameter.
So, the function that makes the create page link would look something like this:
function createPageLink() {
if ($search) return wl($search)+'&do=edit';
else return wl($ID)+'&do=edit';
}
Obviously, I haven't looked at the real code here, but you get the idea.