Project

General

Profile

Bug #100565

Updated by Sybille Peters about 1 year ago

I am not sure if this should be considered a bug. The entered link in sys_redirect.target was wrong. 
 

 h2. Possible improvements: 

 - If the link entered in sys_redirects.target is wrong, display this with a warning (!) in the form 
 - better errror handling so that excption is not thrown, but log message is generated 

 h2. Reproduce (1): 


 1. Create a redirect with sys_redirect.target=" *t3://page=uid=18&_language=1* " 
 2. Save the record: exception will be displayed, but record is saved nonetheless. 

 The exception also occurs if the record already exists and: 

 * reference index is updated 
 * a filter is entered in redirects module which has this entry as result. 


 h2. Error message 


 <pre> 
 Update index of table sys_redirect 
 ---------------------------------- 

  2554/6384 [▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░]    40% 
 In ErrorHandler.php line 137: 
                                                                                                                                                              
   PHP Warning: Undefined array key "page=uid=18&_language=1" in /var/www/mysite/htdocs/typo3/sysext/core/Classes/LinkHandling/LinkService.php line 119   
                                                                                                                                                            
 </pre>  

 h2. Versions 

 * TYPO3 11.5.26 
 * Composer installation 
 * PHP 8.1 

 h2. Code 


 core/Classes/LinkHandling/LinkService.php 

 v11: 

 <pre> 
 119 if (is_object($this->handlers[$type])) { 
 </pre> 


 v12 (main):  

 <pre> 
 if (isset($this->handlers[$type])) { 
   $result = $this->handlers[$type]->resolveHandlerData($data); 
   $result['type'] = $type; 
 } else { 
   throw new UnknownLinkHandlerException('LinkHandler for ' . $type . ' was not registered', 1460581769); 
 } 

 </pre>

Back