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

It's not possible to add new XObjects of classes containing spaces in object mode

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce :

      • Start with a clean instance
      • Import the attached XAR package, it contains a simple AWM with 1 content page
      • Edit the content page in object mode, try to add a new object of the "my test app" class

      Expected : the object gets added
      Actual : when refreshing the page, the object is not displayed anymore

      This seems to come from the improvements performed as part of XWIKI-16210 : when a document is saved, we check if a request parameter addedObjects exists, and try to register the objects to add to the document.

      In order to validate the contents of the request parameter addedObjects, we apply a regex XOBJECTS_REFERENCE_PATTERN, defined here ; the issue is that this pattern does not cover classes which have special characters (spaces, \, /, …) in their document name.

      While it's a good practice to create class documents without special characters in their document names, it's certainly not the case always : for example, it's always possible to create an AWM with special characters.

      This may also impact the pattern XPROPERTY_REFERENCE_PATTERN here.

      Attachments

        Issue Links

          Activity

            People

              caubin Clément Aubin
              caubin Clément Aubin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: