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

Matthew Colton mat.colton at web-xs.de
Thu Dec 25 11:05:01 CET 2014


Hi Helmut,
Am 23.12.2014 um 13:02 schrieb Helmut Hummel:
> Hi Mathew,
>
> Am 23.12.14 um 09:34 schrieb Matthew Colton:> 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.
>
> Ah OK. Seems I misunderstood the problem you described.
>
> > 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
>
> Good you found a solution (although I did not exactly get the case ;)
> And thanks for pointing out this issue.
>
> I'm not sure if this is really a bug, as it kind of makes sense that
> the view is already initialized in the action method.

You're probably right. Now that I understand the basic problem behind
all of that I guess it really is more like a hack ATM. But I would
prefer not to have a generic initializeView method as it really tears it
apart and requires a lot of switches in my case.
It would be nice to handle the template in a
"initialize{ActionName}View" method. Nice idea and it would keep the
code clean and lean. :)

>
> I added some comments to the ticket, maybe you can comment on my
> comment ;)

I did, but I felt a little dumb since it took a while til I really
understood the problem. :D

Cheers,
Matthew



More information about the TYPO3-project-typo3v4mvc mailing list