Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-22150

Can't move a moved page back to its original location if redirect is enabled

    XMLWordPrintable

Details

    • Integration
    • Unknown
    • N/A
    • N/A

    Description

      Not sure if to report this as a feature request, or a bug. Anyway, the following scenario currently fails on this SQL error:

      ERROR: duplicate key value violates unique constraint "xwikidoc_pkey" Detail: Key (xwd_id)=(6727705533571970800) already exists.

      Repro:

      1. Use the "Move / Rename" action to move a page (tested on a page with children) to a new location. Select "Create an automatic redirect" before confirming the move. This succeeds.
      2. Use the "Move / Rename" action on the moved page once again and set the new location to the original location. This fails with the error(s) above.

      It looks like what is needed here for the move/rename action is to recognize that there is already a page on the target location and that it contains just the redirect property which points to the page being moved. And to rewrite that page containing the redirect - instead of failing the move. I don't have enough insight though, so it might be possibly more complicated...

      Workaround: Delete all the existing redirect pages manually before proceeding with step 2. Tips on how to automate this step would also be great.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              pbodnar Petr Bodnár
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: