[
https://issues.apache.org/jira/browse/JSPWIKI-252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Florian Holeczek closed JSPWIKI-252.
------------------------------------
> Rename page with attachment kills Main-Page
> -------------------------------------------
>
> Key: JSPWIKI-252
> URL: https://issues.apache.org/jira/browse/JSPWIKI-252
> Project: JSPWiki
> Issue Type: Bug
> Components: Core & storage
> Affects Versions: 2.6.2
> Environment: Java 1.6, JspWiki 2.6.2
> Reporter: akakunin
> Fix For: 2.6.3
>
> Attachments: JSPWIKI-252.patch
>
>
> We met this bug in our www.emforge.org (it is used WikiEngine with own JSF
> GUI) - but I just reproduced this problem in sandbox:
> 1. Create any Page (for example TestPage1)
> 2. Add attachment to this page (for example somefile.jpg)
> 3. Add text on this page referenced to this attachment: ( for example just
> [somefile.jpg])
> 4. So - now everything is ok - you have page with attachment and this page
> has link to the attachment
> 5. Open page Info dialog and rename page (for example to TestPage2)
> 6. Everything is ok - page is renamed
> 7. Open Main-Page
> 8 - Uuups - Main page is Empty! (Right now you can check it in sandbox - I
> crealed main page by this way)
> I debug it a little bit - problem is in PageRenamer.updateReffererOrRename
> method. During rename it is called with oldName=TestPage1 and newName
> TestPage2
> At line 238 it is created tempCtx for old page (TestPage1). Since (seems)
> this page is not already exists - m_wikiEngine.getPage() returned null.
> But WikiContext constructor for null page created context for Main page - and
> later - it is cleared Main page.
> In EmForge this problem is reproduced then we trying to report bug (via New
> Bug Wizard) and has attachment (for example picture) and reference to
> attachment in bug-description (quite common problem). So, since it is caused
> quite often - it is produced big problem for us - so, it is why I marked this
> bug as blocker.
> In any case - I do not think it is good that it is possible to clear Main
> page then you do not do it :)
> Please - feel free to contact me if you will need any additional info.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira