There are 3 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-c0f9991c-1518-4a73-a2a4-24b03104d48e XWIKI-23611 Open

Form data within a gadget are not saved.

 
View issue   ยท   Add comment
 

3 updates

 
cid:jira-generated-image-avatar-7fbfffd2-2aa3-490c-9027-df04b56cdac4 Changes by Andreas Rosenstiel on 23/Oct/25 15:29
 
Description: I created a simple macro to save their XWiki favorites in the users profile and show it in the menu:

{noformat}
{{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}}
{noformat}

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.

 

 
Attachment: 2025-10-23_15-28-17.mp4
Attachment: Macros.Favorites2.xar
 
 

1 comment

 
cid:jira-generated-image-avatar-7fbfffd2-2aa3-490c-9027-df04b56cdac4 Andreas Rosenstiel on 23/Oct/25 15:37
 

Yes, I can save data when I set the wiki editor for the links field. However, as my users rely on the WYSIWYG editor (see video), this is not a viable solution.