[
https://issues.apache.org/jira/browse/JSPWIKI-1162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18132843#comment-18132843
]
Arturo Bernal commented on JSPWIKI-1162:
----------------------------------------
I could reproduce this, with page names that contain blanks. The tests
mentioned above use names without blanks, such as TestPage, and for those the
second rename gives the right result, which is probably why they could not
reproduce it.
With the pages named Test Page, Foo Test and Bar Test, a referrer that links to
Test Page without a text becomes a link with the text Test Page and the target
Foo Test at the first rename, which is intended. At the second rename it
becomes a link with three parts: Test Page, Foo Test and Bar Test. A referrer
that links to Test Page with its own text, such as Alpha, already gets the
third part at the first rename.
The cause is in DefaultPageRenamer.replaceSingleLink: the rule that keeps the
old name as the text of the link when it contains blanks was also applied to
the target of a link that already had a text. Pull request 554 limits the rule
to the case where the name is also the text of the link, with three new tests
that fail without the change.
> Multiple page renames (with updating referrers) causing problems
> ----------------------------------------------------------------
>
> Key: JSPWIKI-1162
> URL: https://issues.apache.org/jira/browse/JSPWIKI-1162
> Project: JSPWiki
> Issue Type: Bug
> Components: Editors
> Affects Versions: 2.11.0-M8
> Reporter: Gary Kephart
> Priority: Major
> Labels: pull-request-available
>
> When page A gets renamed to B and the referrers are to get updated, the
> referrers have [A|B] in their pages, which is what is expected.
> However, when page B gets renamed to C and the referrers are to get updated,
> the referrers have [A|B|C] in their pages, which is not what is expected. I
> would expect [A|C].
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)