Description

Backlinks have been broken since subpages were introduced.

Backlinks as in 1.3.3 are quite broken; only the last path segment is searched for. So if we want to get the backlinks of HilfeAllgemein/FragenUndAntworten, get all pages that contain /FragenUndAntworten. If you have parallel structures like A/FragenUndAntworten, B/FragenUndAntworten, etc., this would yield many false positives.

MoinMoin could build a fulltext query. But its length will quickly exceed the limit of GET request lines (i.e. the querystring gets too long), besides that it looks like an unneeded way of indirection. The query would look like this: ("HilfeAllgemein/FragenUndAntworten" or (t:r:^HilfeAllgemein and "/FragenUndAntworten") or (t:r:^HilfeAllgemein/ and "../FragenUndAntworten")

Realising that this is O(n^2), i.e. it will get much faster complex than your pagename, you may even notice that this way of searching hides other important links - all links that cannot be found by a simple string search. This might include macros that issue links or other parsers that use a different link format.

So how about introducing a new search modifier? My current patch allows to search using this term: linkto:HilfeAllgemein/FragenUndAntworten. Now think about grouping this term - like if you want to know which page links to page A and B - that is quite simple using this scheme.

Example

Click onto the title of this page.

Details

This wiki.

Workaround

Build a query like above and wonder why it still does not catch all backlinks.

Use the new backlink system, see the patch.

Reorder your world view to just include forward references.

Patch

See backlinks.patch

This patch is not acceptable, we will not add a new search modifier as part of a bug fix release. Its a major user interface change. The fix should use the current code.

-- NirSoffer 2005-02-10 23:58:36

Discussion

This is possible, but it is much simpler to create a new action, "backlinks", that does this search. Example of short and nice url:

http://wiki.example.com/PageName?action=backlinks

We should not modify the search syntax to solve specific problem. We should change search syntax only if it is really needed by the users - and after much thought.

I just tried this in my test wiki, the results are so broken its pathetic. We must fix this as soon as possible. Seems that using the full page name for the search is a trivial fix. It will ignore ../ links and such but that better then huge amount of false positive results. Another option is to look into the pagelinks cache that each page has, maybe this cache even expand those ../ links?

If the second approach works, we should simply add an action "backlinks" that will run this code instead of full text search. It should be also faster. -- NirSoffer 2005-02-11 18:16:07

Plan


CategoryMoinMoinBugFixed CategoryRelease1.3.4

MoinMoin: MoinMoinBugs/BacklinksAreBroken (last edited 2007-10-29 19:10:15 by localhost)