Project

General

Profile

Bug #82460

Updated by Markus Klein over 6 years ago

h3. situation 

 Using this user TSconfig 

 <pre> 
 admPanel { 
   enable { 
     preview = 1 
   } 
   override { 
     preview = 1 
     preview.showHiddenRecords = 1 
   } 
 } 
 </pre> 


 h3. result 

 yields this error in FE 

 <pre> 
 #1462820645: accessTimeStamp needs to be set to an integer value, but is empty! Maybe $GLOBALS[‘SIM_ACCESS_TIME’] has been overridden somewhere?  
 </pre> 


 h3. expected  

 The expected behaviour would be to see hidden records and the red "preview" symbol at the top right. 


 h3. solution 

 The frontend request handling initializes the admin panel, which evaluates the configuration. 
 Part of this evaluation is to set $GLOBALS[‘SIM_ACCESS_TIME’] to the value given as "simulate time" in the admin panel (or via configuration). This fails and hence the value gets zero, which leads to the seen exception. 

 The evaluation fails as it calls @$simTime = $backendUser->adminPanel->extGetFeAdminValue('preview', 'simulateDate');@. 
 As seen in the configuration above the value for "simluateDate" is not configured and the logic inside extGetFeAdminValue returns the value of 'preview' in this case, which hasn't been requested. 

 The fix is to make sure that this lookup on the first key ('preview') is never done if a subkey ('simulateDate') is requested.

Back