1
votes

The problem is the following. I made an extension where i have a list view and detail view. The list view works fine. The problem appears when i am going on the detail view and try to render a Partial through the Show.html. The problem will be explained in detail after the structure.

This is the structure:

↳ Private

     ↳ Partials

         ↳ Detail

             ↳ Apartment

     ↳ Templates

         ↳ ImmobilieImport

             ↳ List.html

             ↳ Show.html

So on the Show.html i have this:

<f:render partial="Detail/Apartment" arguments="{_all}" />

And on the Apartment.html i have a variable to be read:

{immobilieImport.street}

When i am calling the list view and i click on an object, it redirects me to the detail view as it suppose to do. I get the right values back and everything works fine. BUT when i am going back to another object, and click on it to visit the detail view, it does not render the partial nor the Show.html.

I have on my config no_cache = 0 plus i turned the cache off on the page properties too.

When i am using <f:debug>{immobilieImport}</f:debug> i get all the correct values back, but it does not display the html on the frontend.

TYPO3 Version 7.6.23

Any ideas what is happening? If you need more information, feel free to ask.

Best regards

1
When you set config.no_cache = 1 is all displayed correctly? Then you maybe have an cHash issue.René Pflamm

1 Answers

0
votes

I found the solution to my problem and i will explain it in detail so if anyone else has the same problem, he can find the answer.

The problem could be very common if someone using FlexForm settings.

On my List view i have an <f:if> statement, where i evaluate if the creation date is less than 30 days. I made it flexible by letting the user to define the time on his own. In order to let the user to do that, you need to add the setting on your FlexForm. So on my FlexForm, i had this:

<settings.timeToGetOld>
   <TCEforms>
      <label>Number of days that stays as "New"</label>
      <displayCond>FIELD:switchableControllerActions:=:ImmobilieImport->list;ImmobilieImport->show</displayCond>
      <config>
         <type>input</type>
         <size>6</size>
         <max>6</max>
         <eval>int</eval>
         <default>30</default>
      </config>
   </TCEforms>
</settings.timeToGetOld>

FIELD:switchableControllerActions:=:ImmobilieImport->list;ImmobilieImport->show

This is actually ONLY the List View and it is written that way cause it is "Controller action combinations".

On my controller and list action:

$this->view->assign('settings', $this->settings);

and then on my fluid:

f:if condition="{f:format.date(date: '{immobilieImport.creationDate}', format: 'Y-m-d')} > {f:format.date(date: 'now-{settings.timeToGetOld} days', format: 'Y-m-d')}"><span class="new_object">New</span>

The problem appeared when i tried to use that evaluation on my Detail View. Since i haven't specified any setting field for the Detail View whatsoever, the Fluid Engine could't process the evaluation so it through an error by not displaying anything. Given the fact that it reads the document Top to Bottom, when the Fluid Engine encountered the problem, it stopped.

After i figured out what the problem was, i've added one more setting on my FlexForm:

<settings.timeToGetOldDetailView>
       <TCEforms>
          <label>Number of days that stays as "New"</label>
          <displayCond>FIELD:switchableControllerActions:=:ImmobilieImport->show</displayCond>
          <config>
             <type>input</type>
             <size>6</size>
             <max>6</max>
             <eval>int</eval>
             <default>30</default>
          </config>
       </TCEforms>
    </settings.timeToGetOldDetailView>

Now i've changed the displayCond only to the Detail View (Show) and i've changed my Fluid (Show.html) to {settings.timeToGetOldDetailView} too:

f:if condition="{f:format.date(date: '{immobilieImport.creationDate}', format: 'Y-m-d')} > {f:format.date(date: 'now-{settings.timeToGetOldDetailView} days', format: 'Y-m-d')}"><span class="new_object">New</span>

I also added this on my Controller:

$this->view->assign('settings', $this->settings);

Everything now works fine.