[ 
https://issues.apache.org/jira/browse/JSPWIKI-1066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18136993#comment-18136993
 ] 

Arturo Bernal commented on JSPWIKI-1066:
----------------------------------------

Cause: DefaultReferenceManager.scanWikiLinks only parses the page, and the 
parser reports links but not plugin parameters, so the page parameter of 
InsertPage is never seen. ParserStagePlugin.executeParser has no access to the 
link hooks.

Two ways: (A) scanWikiLinks reads the InsertPage elements of the parsed 
document, about 20 lines and no new API, but it names one plugin in the 
reference manager; (B) a way for a ParserStagePlugin to report the pages it 
refers to, which is a public API addition.

I tried A as a prototype: the referrers of an inserted page include the host 
page, they disappear when the plugin is removed, and an inserted page that does 
not exist shows in findUncreated. ReferenceManagerTest, PageRenamerTest, 
ReferringPagesPluginTest, UndefinedPagesPluginTest and InsertPageTest pass with 
it.

Not checked: the whole suite, the pre-translate filters (the prototype skips 
them), the section and maxlength parameters, references stored on disk for an 
existing wiki, UnusedPagesPlugin, and PR 542 (JSPWIKI-656), which rewrites 
InsertPage on rename and does not record it as a reference.

A or B? And should an inserted page count as referenced everywhere, or only in 
the incoming links? JSPWIKI-1065 has the same root cause.

> Inserted page is not considered as referenced
> ---------------------------------------------
>
>                 Key: JSPWIKI-1066
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-1066
>             Project: JSPWiki
>          Issue Type: Improvement
>            Reporter: Harvey Echain
>            Priority: Minor
>
> An inserted page is marked as referenced by nothing (empty "Incoming links", 
> empty result from ReferringPagePlugin).
> For example, this makes it hard to figure out in which page a page is 
> inserted.
> Inserting and linking are obviously a bit different, but I would personally 
> expect that an inserted page gets considered the same way as a linked one 
> regarding references.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to