Project

General

Profile

Bug #98229

Updated by Oliver Hader about 2 years ago

In our Typo3 v10.4.31 instance there seems to be a false query, if the preview for a news listing is generated.  

 Workflow: 
 - edit one news entity and set a new sys_category relation, save 
 - in db there is a new line added holding the data from the edited entity w/ t3ver_state = -1 / t3ver_wsid = 2 / t3ver_oid pointing (uid) to the live one 

 If the query is generated it results in the following sql: 

 <pre><code class="sql"> 
 SELECT `tx_news_domain_model_news`.* 
 FROM `tx_news_domain_model_news` `tx_news_domain_model_news` 
 WHERE ((`tx_news_domain_model_news`.`type` = 0) 
     OR (`tx_news_domain_model_news`.`type` = 1) 
     OR (`tx_news_domain_model_news`.`type` = 2)) 
   AND (((`tx_news_domain_model_news`.`uid` IN (SELECT `uid_foreign` FROM `sys_category_record_mm` WHERE (`uid_local` = 443) 
   AND ((`sys_category_record_mm`.`fieldname` = 'categories') 
   AND (`sys_category_record_mm`.`tablenames` = 'tx_news_domain_model_news')))) 
   AND ((`tx_news_domain_model_news`.`archive` >= 1661853965) 
     OR (`tx_news_domain_model_news`.`archive` = 0))) 
   AND (`tx_news_domain_model_news`.`pid` IN (237, 6327, 6329, 6328))) AND (`tx_news_domain_model_news`.`sys_language_uid` IN (0, -1)) 
   AND (`tx_news_domain_model_news`.`t3ver_oid` = 0) 
   AND ((`tx_news_domain_model_news`.`deleted` = 0) 
   AND ((`tx_news_domain_model_news`.`t3ver_wsid` = 0) 
     OR (`tx_news_domain_model_news`.`t3ver_wsid` = 2)) 
   AND (`tx_news_domain_model_news`.`t3ver_oid` = 0)) 
   ORDER BY `tx_news_domain_model_news`.`datetime` DESC 
 </code></pre> 

 Because of the contraint (which is included twice) "AND (`tx_news_domain_model_news`.`t3ver_oid` = 0)" the new (via editing) one is not in the result set and therefore is not displayed. 

 I assume this is a bug, can anyone can confirm this?

Back