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

Form data within a gadget are not saved.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Critical
    • None
    • 15.10.12, 17.8.0, 16.10.13
    • Dashboard
    • XWiki Debian 17.8.0
    • Unknown

    Description

      I created a simple macro to save their XWiki favorites in the users profile and show it in the menu:

      {{velocity}}
      #set($u=$xcontext.getUser())
      #set($d=$xwiki.getDocument($u))
      #set($o=$d.getObject("Macros.Favorites", 0))
      #if("$!o" == "")
        #set($o=$d.newObject("Macros.Favorites"))
        #set($x=$d.save())
      #end
      #if("$xcontext.action" != "edit")
        $d.display("Links", "view", $o)
      #else
        $d.display("Links", "edit", $o)
      #end
      {{/velocity}}
      

      The Macros.Favorites class contains the field Links, which is of type TextArea.

      To enable easy access, the user added the Favorites macro as a gadget to their dashboard in the profile. This provided a simple way to save favorites within XWiki, which remained up to date even when the referenced page was moved.

      Since the upgrade from XWiki 12.10.9 to 17.8.0, the entered data is no longer saved, and new favorites cannot be added.

      I've attached a page (Macros.Favorites2.xar) that contains the hole case with a slightly modified code. If the macro Favorites2 is used as Gadget in the Dashboard no data will be saved. If you use the macro Favorites2 directly everything works fine.

      I've also attached a short video (2025-10-23_15-28-17.mp4) that shows how it works to save the favorites.

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              r3d-5 Andreas Rosenstiel
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: