Project

General

Profile

Bug #77869

Updated by Alex Kellner about 8 years ago

This issue is related to #77868 

 In powermail there is a FlexForm that renders a select field with some records. Up to T3 8.2 it was possible to change the ordering with "foreign_table_where". Now an error comes up. A simple FlexForm configuration could be: 
 <pre> 
 <TCEforms> 
	 <label>Something</label> 
	 <config> 
		 <type>select</type> 
		 <renderType>selectSingle</renderType> 
		 <items type="array"> 

		 </items> 
		 <size>1</size> 
		 <minitems>1</minitems> 
		 <maxitems>1</maxitems> 
		 <foreign_table>tx_powermail_domain_model_form</foreign_table> <foreign_table>fe_users</foreign_table> 
		 <foreign_table_where>AND tx_powermail_domain_model_form.deleted = 0 
			 AND tx_powermail_domain_model_form.hidden = 0 
			 AND tx_powermail_domain_model_form.sys_language_uid IN (-1,0) 
			 <foreign_table_where>and deleted=0 order by tx_powermail_domain_model_form.title</foreign_table_where> uid asc</foreign_table_where> 
	 </config> 
 </TCEforms> 
 </pre> 

 This leads to: 
 <pre> 
 An exception occurred while executing 'SELECT `tx_powermail_domain_model_form`.`uid`, `tx_powermail_domain_model_form`.`title`, `tx_powermail_domain_model_form`.`t3ver_id`, `tx_powermail_domain_model_form`.`t3ver_state`, `tx_powermail_domain_model_form`.`t3ver_wsid`, `tx_powermail_domain_model_form`.`t3ver_count`, `tx_powermail_domain_model_form`.`hidden`, `tx_powermail_domain_model_form`.`starttime`, `tx_powermail_domain_model_form`.`endtime` `fe_users`.`uid`, `fe_users`.`username`, `fe_users`.`disable`, `fe_users`.`starttime`, `fe_users`.`endtime` FROM `tx_powermail_domain_model_form`, `fe_users`, `pages` WHERE (tx_powermail_domain_model_form.deleted = 0 (deleted=0) AND tx_powermail_domain_model_form.hidden = 0 AND tx_powermail_domain_model_form.sys_language_uid IN (-1,0) order by tx_powermail_domain_model_form.title) AND ( 1=1) AND (`pages`.`uid` = `tx_powermail_domain_model_form`.`pid`) `fe_users`.`pid`) AND ((`tx_powermail_domain_model_form`.`deleted` ((`fe_users`.`deleted` = 0) AND (`pages`.`deleted` = 0))': You have an error 0)) ORDER BY `uid` asc': Column 'deleted' in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by tx_powermail_domain_model_form.title) AND ( 1=1) AND (`pages`.`uid` = `' at line 4 where clause is ambiguous 
 </pre> 

 My first thought were that there is an extra configuration for sorting, but the documentation says foreign_table_where is still ok for sorting: https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Select/Index.html#foreign-table-where 

 Am I wrong or is this a small bug?

Back