Project

General

Profile

Bug #86426

Updated by Mathias Brodala about 6 years ago

I have tried to achieve a simple filter for items and wanted filter those items by a multiselect field of types. 

 After submitting the form with multiple values selected following error occured: 

 !ftranslate.PNG! 

 <pre> 
 Either "key" or "id" must be provided for f:translate 
 in TranslateViewHelper.php line 131 
 </pre> 

 The necessary code is als following: 

 <pre> 
 <?php 
 namespace Vendor\Theme\Domain\Model; 

 class Demand extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity { 

     /** 
      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Vendor\Theme\Domain\Model\Type> 
      **/ 
     protected $types; 


     /** 
      * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Vendor\Theme\Domain\Model\Type> The type of the demand 
      * @return void 
      */ 
     public function setTypes($types) { 
         $this->types = $types; 
     } 
     /** 
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage 
      */ 
     public function getTypes() { 
         return $this->types; 
     } 
 } 

 ###Search.html### 

 <f:form class="form" method="post" action="search" name="demand" object="{demand}"> 

     <f:form.select property="types" options="{types}" optionLabelField="title" optionValueField="uid" multiple="1" size="10" /> 

     <f:form.submit value="filter"/> 
 </f:form> 

 </pre> 

 The problem was solved when I deactivated the admin panel: 

 !toolbar.PNG! 

 panel. Seems to be an unwanted lang overlay for debugging issues??? 

 

Back