|  
                               
                               
                              
                               
                              |  Summary:  |  
                               Current document is not properly set when calling LiveTable Results in LiveData  |  
                                
                               
                              |  Issue Type:  |  
                                 Bug  |  
                                
                               
                              |  Affects Versions:  |  
                               16.4.2  |  
                                
                               
                              |  Assignee:  |  
                               Unassigned  |  
                                
                               
                              |  Components:  |  
                               Live Data  |  
                                
                               
                              |  Created:  |  
                               24/Sep/24 09:28  |  
                                
                               
                              |  Priority:  |  
                                 Major  |  
                                
                               
                              |  Reporter:  |  
                               Simon Urli  |  
                                
                               
                              |  Description:  |  
                                Reproduction steps:  
                               
                              - Create a dedicated LiveTable results containing some code such as:
  noformat  velocity wiki="false"  #set ($lastAuthor = $doc.contentAuthorReference)  #set ($currentUser = $xcontext.userReference)  #set ($discard = $xcontext.context.setUserReference($lastAuthor))  #gridresultwithfilter("XWiki.XWikiUsers" $request.collist.split(","))  #set ($discard = $xcontext.context.setUserReference($currentUser))  /velocity  noformat  
                              - Create a livedata using that result page
  
                                Expected result:  
                               
                              - the livedata displays the entries by using the defined context user
  
                                Obtained result:  
                               
                              - the livedata doesn't display any entry, only N/A rows. However it works by resoluving manually the author.
  
                                The reason of the error is apparently that $doc is not properly assigned when the request is made in LiveData REST API to get LT results.   |  
                                
                              
                                 |