Project

General

Profile

Bug #89182

Updated by Sybille Peters about 1 month ago

Some checks should only be performed if content is relevant. Additionally, the type ($GLOBALS['TCA'][$table]['columns'][$field]['config']['type']) / softref configuration may change due to "columnsOverrides":https://docs.typo3.org/m/typo3/reference-tca/main/en-us/Types/Properties/ColumnsOverrides.html  

 For example: 

 Currently, no TCA processing tt_content.bodytext : depends on ctype (e.g. is performed, so this is usually not taken into account. 

 relevant for plugins) 
 pages.url : depends on doktype 


 The problem is currently, if page or content element types are changed, the content is not removed from the fields which are now no longer relevant, so in older sites where this had been changed, you may get a lot of "broken links" for content that is not rendered in FE and is irrelevant. 


 h2. Examples 

 * tt_content.bodytext : depends on ctype (e.g. is usually not relevant for plugins or header) 
 * pages.url : depends on doktype 



 h2. known problems 

 * if there are broken links in fields which are not relevant (e.g. due to type, displayCond, etc.) 
 * which softref parsers are used depends on the type of the field. One field may have different types depending on context (e.g. type of record) 


 h2. h2 Reproduce 

 # Create a content element, e.g. "text & media" 
 # Add a broken link to the content (tt_content.bodytext) 
 # Now change the content type, e.g. to plugin or header 
  
 # We recheck for broken links for that page 
 # We look at linkvalidator report 

 h2. Actual result: result 

 The broken link will be displayed 

 h2. Expected result: result 

 The broken link in the element "plugin" should not be displayed, because tt_content.bodytext is not relevant if content type is plugin 


 h2. Possible solution 

 It should be possible to get the information, which fields are editable via TCA: 'interface' => 'showRecordFieldList'.  

 Additionally, the type should be evaluated (e.g. tt_content.CType, pages.doktype, based on $GLOBALS['TCA'][$table]['ctrl']['type']. 


 How to handle this, e.g. 

 # do TCA processing in Link Validator 
 # alternative: have "cleanup" script which removes irrelevant content (e.g. as in lowlevel cleaner Flexform cleanup). However, columnsOverrides should still be performed to get the correct type. 



Back