[TYPO3-mvc] Standalone View and hidden values in forms e.g. [__referrer][@action]

Matthew Colton mat.colton at web-xs.de
Tue Dec 23 09:34:43 CET 2014


I wasted a lot of time because of a *two year old* bug in the Typo3. The
bug is that if setTemplatePathAndFilename is used it works perfectly but
there must be a dummy file in the original position due to a bug in
Typo3, otherwise Typo3 throws an exception. This is not required when
using a standalone view, but that on the other hand it won't work at all
for forms.
So that's how I solved the problem, just created an empty dummy file for
the action and used setTemplatePathAndFilename and everything works like
a charm, no need for Typoscript to solve the problem of altering templates.

https://forge.typo3.org/issues/34844

Thank you anyway Helmut!

-- 
Cheers
Matthew

Am 23.12.2014 um 01:06 schrieb Helmut Hummel:
> Hi Matthew!
>
> Am 20.12.14 um 19:52 schrieb Matthew Colton:
>
>> Everything is fine except the reservation form. The form itself is a
>> partial that cannot be changed by the venues. Anyway, Extbase normally
>> adds some hidden fields to a form e.g. "[__referrer][@action]". This
>> doesn't work in the form. The values are always:
>
> This will not work with a standalone view, as there is no controller
> context to properly render the fields you mention.
>
> You should put move the form to a template of an action (let's say
> newResarvationAction), write TypoScript (e.g. lib.newReservation) that
> renders this action of your plugin and use the <f:cObject
> typoscriptObjectPath="lib.newReservation" /> to render your form in
> that partial.
>
> Kind regards,
> Helmut
>




More information about the TYPO3-project-typo3v4mvc mailing list