JSPWiki
  1. JSPWiki
  2. JSPWIKI-663

Rename page - page index still shows attachment with old page name

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.4
    • Fix Version/s: 2.9.1
    • Component/s: Core & storage
    • Labels:
      None
    • Environment:

      Websphere

      Description

      After renaming a page with an attachment, there is still a link in the page index to the attachment with the old name. Clicking on the link in the page index does not have sense, it will lead to the creation of a new page.

      Scenario

      • create new page "Q new page"
      • add attachment "attachment.jpg"
      • rename page "Q new page" to ""Q new page new name"
      • result : page index contains for letter Q : "Q new page new name, Q new page/attachment.jpg"
      1. JSPWIKI663.patch
        2 kB
        Glen Mazza
      2. rename page - name attachment.gif
        14 kB
        Bruno Peeters
      3. testjspwiki.txt
        0.0 kB
        Glen Mazza

        Activity

        Bruno Peeters created issue -
        Bruno Peeters made changes -
        Field Original Value New Value
        Attachment rename page - name attachment.gif [ 12455135 ]
        Hide
        Glen Mazza added a comment -

        Patch to fix problem.

        Show
        Glen Mazza added a comment - Patch to fix problem.
        Glen Mazza made changes -
        Attachment JSPWIKI663.patch [ 12562360 ]
        Hide
        Glen Mazza added a comment -

        Attached patch appears to fix this problem.

        Scenario:
        1.) On the Main page, add [

        {IndexPlugin}

        ].
        2.) Create a Page1 with an attachment foo.png, you'll see both Page1 and Page1/foo.png listed on the Main Page (due to the Index Plugin).
        3.) Rename Page1 to Page2 and go back to the Main Page, you'll see Page2 and Page1/foo.png listed (bad: should be Page2/foo.png).

        After applying patch, you'll correctly see Page2 and Page2/foo.png listed.

        Show
        Glen Mazza added a comment - Attached patch appears to fix this problem. Scenario: 1.) On the Main page, add [ {IndexPlugin} ]. 2.) Create a Page1 with an attachment foo.png, you'll see both Page1 and Page1/foo.png listed on the Main Page (due to the Index Plugin). 3.) Rename Page1 to Page2 and go back to the Main Page, you'll see Page2 and Page1/foo.png listed (bad: should be Page2/foo.png). After applying patch, you'll correctly see Page2 and Page2/foo.png listed.
        Harry Metske made changes -
        Assignee Harry Metske [ metskem ]
        Hide
        Harry Metske added a comment -

        Fixed in 2.9.1-svn-7.
        Also patched the PageViewPlugin, which handles the WikiPageRenameEvent and tries to unconditionally "rollover" pagecounts from the fromPage to the toPage, which fails if the page has no pageviews at all.

        thanks Glenn.

        regards,
        Harry

        Show
        Harry Metske added a comment - Fixed in 2.9.1-svn-7. Also patched the PageViewPlugin, which handles the WikiPageRenameEvent and tries to unconditionally "rollover" pagecounts from the fromPage to the toPage, which fails if the page has no pageviews at all. thanks Glenn. regards, Harry
        Harry Metske made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.9.1 [ 12321249 ]
        Resolution Fixed [ 1 ]
        Glen Mazza made changes -
        Attachment testjspwiki.txt [ 12562489 ]

          People

          • Assignee:
            Harry Metske
            Reporter:
            Bruno Peeters
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development