﻿ticket	summary	type	release	owner	status	created	modified	_description	_reporter
6874	Add option for filtering backlink pages	enhancement	0.11	Trap	new	2010-03-24T19:22:20+01:00	2010-03-24T19:22:20+01:00	It would be useful to tell BackLinksMacro to only list out pages that match a certain pattern, rather than all pages which link back, especially for projects which make heavy use of subpages.	Chris Charabaruk
13144	Rewrite plugin to utilize TracBackLinkPlugin	enhancement			new	2017-04-11T02:07:03+02:00	2018-04-01T14:19:14+02:00	This plugin can just be a simple macro that depends on TracBackLinkPlugin.	Ryan J Ollos
13755	BackLinksMacro lists pages which do not have backlinks	defect	1.2		new	2020-02-25T15:03:44+01:00	2020-02-26T04:53:01+01:00	"The BackLinksMacro is supposed to ""show you which wiki pages refer to the current page"", .i.e. link to the current page.

However, the macro also lists pages that do not actually link to the current page.

== Expected behaviour

A page linking to `[[swallow]]` should be listed in the backlinks of `swallow`. However, a page merely mentioning `swallow` outside of a link should not be listed as a backlink.

== Actual behaviour

The macro lists all pages containing `swallow`, be it in a link or not. This clutters backlink listings with unwanted and useless links.

''In our use case, we use backlinks as a sort oft tagging feature with auto-generated link lists. For example, we leave a `[[Minutes]]` link on minutes pages. The backlink list of the `Minutes` page then has a list of all minutes in the wiki.''

== Steps to reproduce

1. Install the macro.
2. Create a page mentioning `swallow` outside a link.
3. Create the wiki page `swallow` and insert the `[[BackLinks]]` macro.
4. The page will list the page mentioning `swallow`, although it does not actually link to the `swallow` page.

== Possible Cause

The culprit apparently is the `_get_backlinked_pages` method in [[https://trac-hacks.org/browser/backlinksmacro/trunk/backlinks/macro.py|macro.py]], which, as far as I understand the SQL, merely scans for the page name, but does not even seem to attempts to check whether it actually appears in a link.
"	Florian Berger
