Project

General

Profile

Bug #90190

Updated by Riccardo De Contardi almost 5 years ago

I write this issue here because it might be also a core problem that could affect third-party code; feel free to close if not pertinent. 

 h3. Prerequisites: 

 - TYPO3 9.5.13 
 - EXT:vhs 6.0.0 
 - EXT:frontend_editing 1.9.0 

 EXT:frontend_editing is activated 

 h3. Steps to reproduce 

 - Create a page, put in it a content element, hide it (It is actually not necessary, it seems to happen also on empty pages) 
 - Visit the page on frontend, with the frontend_editing interface activated 
 - click on the "show hidden content" button: 

 !fe_edit.png! 

 This leads to an exception: 

 <pre> 
 (1/1) #1384611413 TYPO3Fluid\Fluid\Core\ViewHelper\Exception 
 No record was found. The "record" or "uid" argument must be specified. 

 in /Siti/typo3.9.demo.it/public/typo3conf/ext/vhs/Classes/Utility/ErrorUtility.php line 25 

      */ 
     public static function throwViewHelperException($message = null, $code = null) 
     { 
         if (version_compare(TYPO3_version, '8.0', '>=')) { 
             throw new \TYPO3Fluid\Fluid\Core\ViewHelper\Exception($message, $code); 
         } 
         throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception($message, $code); 
     } 
 } 

 at FluidTYPO3\Vhs\Utility\ErrorUtility::throwViewHelperException('No record was found. The "record" or "uid" argument must be specified.', 1384611413) 

 ... 
 </pre> 

 I attach here also as a pdf file the full stacktrace (vhs-issue.pdf) 

 The problem seems actually due to the usage of    The problem is actually caused by the usage of @<v:page.resources.fal>@ in this way: 

 <pre> 
 <v:page.resources.fal table="pages" field="nav_thumbnail" uid="{item.uid}" as="images">{images.0.alternative}</v:page.resources.fal> 
 </pre> 

 inside one of the page partials: EXT:bhsiteconf/Resources/Private/Partials/Page/Megamenu.html: 

 <pre> 

 <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" 
       xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers" 
       data-namespace-typo3-fluid="true"> 

 <div class="accordion-group"> 
     <v:menu entryLevel="0" levels="1" expandAll="1" > 
      
         <f:for each="{menu}" as="item"> 

         <f:variable name="alt_thumbnail"> 
             <v:page.resources.fal table="pages" field="nav_thumbnail" uid="{item.uid}" as="images">{images.0.alternative}</v:page.resources.fal> 
         </f:variable> 


         <f:variable name="description_thumbnail"> 
             <v:page.resources.fal table="pages" field="nav_thumbnail" uid="{item.uid}" as="images">{images.0.description}</v:page.resources.fal> 
         </f:variable> 



             <f:if condition="{item.hasSubPages}"> 
                 <div class="collapse dropdown-mega collapsetoggle" id="a{item.uid}" aria-labelledby="al-{item.uid}"> 
                     <div class="container--extrawide"> 
                         <f:if condition="{item.nav_thumbnail}"> 
                             <div class="dropdown-mega__image-text-container"> 
                                 <img class="dropdown-mega__image img-fluid" src="{f:uri.image(src:item.nav_thumbnail,treatIdAsReference:1,cropVariant:'default',width:'335')} " alt="{alt_thumbnail}" /> 

                                 <f:if condition="{description_thumbnail}"> 
                                     <div class="dropdown-mega__text"> 
                                         <p>{description_thumbnail}</p> 
                                     </div>                                     
                                 </f:if> 
                             </div> 
                         </f:if> 
   
                         <div class="dropdown-mega__menu-container"> 
                             <v:menu pageUid="{item.uid}" includeSpacers="1" classActive="menu__item--active" classCurrent="menu__item--active" classHasSubpages="">     
                                 <ul class="menu menu--mega">   
                                     <f:for each="{menu}" as="subItem"> 
                                         <f:if condition="{subItem.doktype} == 199"> 
                                             <f:then> 
                                                 </ul><!--separatore--><ul class="menu menu--mega">   
                                             </f:then> 
                                             <f:else> 
                                                 <li class="menu__item {subItem.class}"> 
                                                     <f:link.page pageUid="{subItem.uid}" title="{subItem.linktext}">{subItem.linktext}</f:link.page> 
                                                 </li> 
                                             </f:else> 
                                         </f:if> 
                                     </f:for>            
                                 </ul> 
                             </v:menu>   
                         </div> 
                     </div> 
                 </div> 
             </f:if> 
         </f:for> 
     </v:menu> 
 </div> 

 </html> 
 </pre> 


 Changing it to 

 <pre> 
  <v:page.resources.fal table="pages" field="nav_thumbnail" record="{item}" as="images">{images.0.alternative}</v:page.resources.fal> 
 </pre> 

 Actually solves the problem; 


 I added two issues on github EXT:vhs and EXT:frontend_editing  

 Here they are for reference: 

 https://github.com/FluidTYPO3/vhs/issues/1617 

 https://github.com/FriendsOfTYPO3/frontend_editing/issues/401 

 Please look especially at Claus Due's comments like https://github.com/FluidTYPO3/vhs/issues/1617#issuecomment-578091295 and https://github.com/FluidTYPO3/vhs/issues/1617#issuecomment-578092094  

 Many thanks to the great Claus Due for helping me digging into this problem.

Back