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

Ihor Slabkyy commented on JSPWIKI-30:
-------------------------------------

Yep. I have the same problem and I am trying to fix it.

1) Create page "TestPage" and try to rename to "Test Page" - it says, that page 
already exist.
2) Also, there is rather big mess with referenced links. It changes only the 
link and not linkText. As for me, when we rename a page, first of all we need 
to change a linkText.

What actually I have done:
replace this
properReplacement = '[' + textLink + '|' + replacementLink+subpage+anchor + ']';
to this
properReplacement = '[' + replacementLink + '|' + 
replacementLink+subpage+anchor + ']';

I am not quite sure if it's ok, I am testing, but that could be a variant.

3) Third bug, that I found is that matchResult sometimes contains LeftMenu, and 
on the next iteration - page content, but sometimes we have page content on the 
first interation (that why links in LeftMenu can't be changed).

> Rename may cause dataloss
> -------------------------
>
>                 Key: JSPWIKI-30
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-30
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Core & storage
>    Affects Versions: 2.5.139-beta
>            Reporter: Janne Jalkanen
>            Priority: Critical
>             Fix For: 2.8
>
>         Attachments: realerrorpage.txt, Rename.jsp.html
>
>
> If rename fails due to an exception in PageRenamer, the end result may be 
> wiping out of some of the pages that refer to the linking page.  The 
> preconditions seem to include a complicated link sentence.  I managed to get 
> this to happen on jspwiki.org by renaming page "MyCodingStandard" to 
> "JSPWikiCodingStandard", which resulted in some of the renaming to fail.  I 
> think some of the links were of the form "my coding standard".
> Suggested correction: let's get rid of the link "guesser", and just modify 
> the actual link reference - and if it's missing, we'll add one.
> Note that this is not real dataloss; you can still get the old page from the 
> page history.  It just causes a new, empty page to be put into the repository.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to