Project

General

Profile

Actions

Bug #101217

closed

Using f:uri.page into FluidEmail broke future redirections in Extbase Controller

Added by Sebastien Convers 10 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2023-07-03
Due date:
% Done:

0%

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

Description

When you have an action in an Extbase controller, where you send a FluidEmail:
If in the mail template, you use {f:uri.page(absolute: 'true')}

Then when you try to use $this->redirect('another'); you will have an error

TYPO3\CMS\Extbase\Service\ExtensionService::getPluginNameByAction(): Argument #1 ($extensionName) must be of type string,
 null given, called in typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php on line 557
Actions #1

Updated by Torben Hansen 10 months ago

  • Status changed from New to Needs Feedback

I was not able to reproduce the problem. The following code has been used in an extbase action (v11):

$email = GeneralUtility::makeInstance(FluidEmail::class);
$email->setTemplate('Test');
$email->subject('Test')->from('from@domain.tld')->to('to@domain.tld');
GeneralUtility::makeInstance(Mailer::class)->send($email);
$this->redirect('list', null, null, null, 21);

Used Fluid template:

  <p>
    Link to page: <f:uri.page pageUid="2" absolute="true" />
  </p>
  <p>
    Link to page (inline): {f:uri.page(pageUid: 2, absolute: 1)}
  </p>

This works as expected in v11 and v12.

Can you please check, if you use other ViewHelpers in your FluidEmail template (e.g. f:uri.action), which may have a missing extensionName parameter.

Actions #2

Updated by Sebastien Convers 10 months ago

I tried it on a fresh install of TYPO3 v11 and i don't have the problem... I must have some conflit somewhere, i will investigate more...

Actions #3

Updated by Sebastien Convers 10 months ago

Ok, my bad, this can be closed, i had a trouble with development version of EXT:vhs
Problem is gone when i go back on EXT:vhs 6.1.3

Sorry for the inconvenience!

Actions #4

Updated by Felix Nagel 5 months ago

Similar issues here with TYPO3 v12 and VHS v7. When using redirect without the extensionName argument, the link was broken. After de-installation of VHS everything work as expected.

I've created a bug report: https://github.com/FluidTYPO3/vhs/issues/1892

Actions #5

Updated by Riccardo De Contardi 5 months ago

  • Status changed from Needs Feedback to Closed

Thank you for your update and sorry for this late reply.

I close this issue as non-core related

If you think that this is the wrong decision please reopen it or open a new issue with a reference to this one

Thank you.

Actions

Also available in: Atom PDF