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

Document cache key collision when page name matches a locale

    XMLWordPrintable

Details

    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      The issue can be noticed on a clean XWiki instance by following these steps:

      • enable multilingual and add French to the list of supported langauges
      • create a new page and put this code:
        {{velocity}}
        $xwiki.getDocument('Sandbox.TestPage1.fr').documentReferenceWithLocale
        {{/velocity}}
        

      Surprisingly, the output is: xwiki:Sandbox.TestPage1(fr). The page name "fr" is treated as a locale. The issue is in UidStringEntityReferenceSerializer which is used to compute the cache key. The problem is that the locale is appended like any other reference component.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: