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

Default preferences are not displayed properly when using xwiki.properties

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 16.4.0-rc-1
    • User - User Profile
    • Unknown

    Description


      We can see an example here with the underline links preference: the user has underlining OFF (the link in the tips panel is not underlined). However it's shown as being the default `OnlyInlineLinks`. To reproduce, we remove the preference from the XWikiPreference object, and we add `underline=No` in the xwiki.properties file.

      This UI is generated by https://github.com/xwiki/xwiki-platform/blob/f67730ee28e51fc8f412b24bc48f6d6e5e7c6ffa/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-profile/xwiki-platform-user-profile-ui/src/main/resources/XWiki/XWikiUserPreferencesSheet.xml#L294 .

      After looking at it for a bit, here's our udnerstanding so far shared on the live chat:

      > we use $xwiki.getXWikiPreference instead of xwiki.getUserPreference which in this case returns "" instead of the xwiki.properties value, and the hard coded fallback is not in line with the xwiki.properties value so it ends up as a bug.

      Lucas C.

      > so they're not the same
      > getXWikiPreferences only checks in the XWiki.XWikiPreferences page and xobject of the same name

      Vincent M.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Lucas C Charpentier Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: