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

Wrong display of users when using default value for userpicker

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Trying to use a user picker widget with velocity macro and a default value, I noticed that the user image and name wasn't displayed in such case.
      Reproduction steps:

      • On a wiki with user XWiki.Foo defined
      • Create a page with following code:
        {{velocity}}
        {{html}}
        #set ($userPickerParams = {
                          'name': 'approverUser',
                          'id': 'approverUser',
                          'class': 'form-control',
                          'value': ['XWiki.Foo'],
                          'data-userScope': 'LOCAL_AND_GLOBAL'
                        })
                        #userPicker(true, $userPickerParams)
        {{/html}}
        {{/velocity}}
        

      Expected result:

      • The user picker should contain a value displaying the user Foo with its name and picture

      Obtained result:

      • the picker contain a text 'XWiki.Foo' (see screenshot)

      Also note that even when removing the value (backspace) and searching "Foo" in the picker, it never displays properly the user.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: