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

The inplace editor still locks the original translation when creating a new translation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 18.8.0-rc-1
    • 16.4.0, 15.10.11
    • Edit
    • None
    • Integration
    • Unknown
    • N/A
    • N/A

    Description

      This was supposed to be fixed by XWIKI-22308, but I checked on 16.6.0 and the problem was still present. This is not a regression. The problem was simply not fixed. It's strange, because I'm pretty sure I tested the fix before closing the issue, but I probably did something wrong because the problem still reproduces on the fix version... Now the fix I did was only client-side, while the problem is also server-side. The Velocity code from `InplaceEditing` uses $tdoc which for a new translation, that wasn't saved yet, still points to the default translation. So even if we call

      /xwiki/bin/get/TestPage/?sheet=XWiki.InplaceEditing&action=lock&lockAction=edit&language=fr&force_token=EjhQ96I4gYxnqE8wNCtnRQ&timestamp=1787828351782
      

      using language=fr, the Velocity code from InplaceEditing is redirecting to

      /xwiki/bin/lock/TestPage/WebHome?ajax=1&action=edit&language=en
      

      because the French translation is not created / saved yet, so $tdoc.realLocale is English.

      The problem is not only the redirect. The edit confirmation check before that is also targeting the default translation because the specified translation doesn't exist yet.

      Attachments

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: