Project

General

Profile

Actions

Bug #100758

open

Viewhelpers and other things do not work outside of extbase context

Added by Markus Klein about 1 year ago. Updated about 2 months ago.

Status:
Accepted
Priority:
Must have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2023-04-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Using f:form* or f:*.action viewhelpers does not work anymore outside of extbase context. For instance within StandaloneView or FLUIDTEMPLATE.

StandaloneView is regularily used for rendering e-mail and there of course links should be generated.

It should be checked if this still works:

  • f:form viewhelper do correctly prefix the fieldnames. E.g. having an non-extbase plugin using StandaloneView the prefix should be like `tx_myext_pi1[name]` for a name input field

Collection of notes from other forge issues:

f:form - Exception:
(1/1) #1639821904 RuntimeException
ViewHelper f:form can be used only in extbase context and needs a request implementing extbase RequestInterface.
/vendor/typo3/cms-fluid/Classes/ViewHelpers/FormViewHelper.php line 148

f:link.action - Exception
(1/1) #1639818540 RuntimeException
ViewHelper f:link.action can be used only in extbase context and needs a request implementing extbase RequestInterface.
/vendor/typo3/cms-fluid/Classes/ViewHelpers/Link/ActionViewHelper.php line 81

In both cases the "TYPO3\CMS\Core\Http\ServerRequest object" is in the $request instead the RequestInterface.


Related issues 5 (0 open5 closed)

Related to TYPO3 Core - Bug #100759: f:translate does not take overrides of labels in TypoScript into account anymoreResolved2023-04-26

Actions
Related to TYPO3 Core - Bug #100760: f:translate: Provide possibility to set a default extensionNameClosed2023-04-26

Actions
Related to TYPO3 Core - Task #98377: Avoid Extbase Request init in StandaloneViewClosed2022-09-19

Actions
Related to TYPO3 Core - Task #101729: [TASK] Allow f:link.action and f:uri.action without ExtbaseClosedStefan Bürk2023-08-22

Actions
Has duplicate TYPO3 Core - Bug #101141: f:form and f.link.action request implementing ServerRequest instead of RequestInterfaceClosed2023-06-21

Actions
Actions #1

Updated by Christian Kuhn about 1 year ago

  • Related to Bug #100759: f:translate does not take overrides of labels in TypoScript into account anymore added
Actions #2

Updated by Christian Kuhn about 1 year ago

  • Related to Bug #100760: f:translate: Provide possibility to set a default extensionName added
Actions #3

Updated by Christian Kuhn about 1 year ago

all three issue were planned as such. they're not bugs.

if changed again, they need proper decision, impact and analysis before. just stating different than before is not good enough.

Actions #4

Updated by Markus Klein about 1 year ago

Please consider that planning might have been insufficient and mistakes can happen.

"different than before" in this case means breaking basic stuff that has been working for years and is relied on by others outside the Core.

Actions #5

Updated by Jo Hasenau 12 months ago

Christian Kuhn wrote in #note-3:

all three issue were planned as such. they're not bugs.

If so, where is the deprecation notice, that tells people this would be breaking change(s) in TYPO3 12?

Didn't find one in the official Fluid docs, where just the documentation of f:form changed in v12 but nothing pointed to those changes in v11.

If changed, they need proper decision, impact, analysis and deprecation before. Just stating planned as such is not good enough. #SCNR

Actions #6

Updated by Jo Hasenau 12 months ago

It would have been easy to just remove the Extbase dependency from the ViewHelpers too with #98377, since they worked with the fake ExtbaseRequest presented by Standalone Fluid anyway - instead they are documented as requires an Extbase-Request now.

Actions #7

Updated by Jo Hasenau 12 months ago

  • Related to Task #98377: Avoid Extbase Request init in StandaloneView added
Actions #8

Updated by Česlav Przywara 10 months ago

  • Has duplicate Bug #101141: f:form and f.link.action request implementing ServerRequest instead of RequestInterface added
Actions #9

Updated by Lina Wolf 10 months ago

What is the recommended way to link to an Extbase Action from non-Extbase context now? We need to offer a migration path

Actions #10

Updated by Markus Klein 10 months ago

  • Description updated (diff)
Actions #11

Updated by Stefan Bürk 8 months ago

  • Related to Task #101729: [TASK] Allow f:link.action and f:uri.action without Extbase added
Actions #12

Updated by Xavier Perseguers 7 months ago

Just hitting this bug after working on migrating EXT:cf_google_authenticator to TYPO3 v11 and now starting pushing up to TYPO3 v12.

This extension uses a StandaloneView whose template depends on a VH I just created for TYPO3 v11 and bangs! this crashes in TYPO3 v12.

Actions #13

Updated by Kai Tallafus 5 months ago

So, how to migrate f:form and f:link.action outside of an extbase context?

Actions #14

Updated by Julian Mair 4 months ago

Do you have a planned solution, or perhaps a workaround or migration path?

Actions

Also available in: Atom PDF