81312[BUGFIX] Ensure working target attribute for link.page and link.action
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Benjamin Franzke +1
-
Verified V +2 Done
- Stefan Bürk +2
- Benjamin Franzke +1
- core-ci +1 CI
Issues 3
Files 4
- typo3/sysext/fluid/Classes/ViewHelpers/Link/ActionViewHelper.php+6 −1
- typo3/sysext/fluid/Classes/ViewHelpers/Link/PageViewHelper.php+6 −1
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/ActionViewHelperTest.php+63 −5
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/PageViewHelperTest.php+41 −4
Review log 2636
Show 811 earlier messages
-
Helmut Strasser uploaded patch set 1 10/03/23, 12:14
-
core-ci voted on patch set 1 V -1 10/03/23, 12:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47369
-
Helmut Strasser uploaded patch set 2
V -110/03/23, 13:27 -
core-ci voted on patch set 2 V +1 10/03/23, 13:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47371
-
Daniel Corn voted on patch set 2 CR +1 10/03/23, 16:02
-
Stefan Bürk updated the commit message in patch set 3
CR +1V +110/04/23, 09:10 -
Stefan Bürk commented on patch set 3 10/04/23, 09:14
I removed the 11.5 from the releases. Reason for that is the simple fact, that in TYPO3 v11 only the extbase uri builder is used and the target tag set there. This change is about the code which has been introduced as a mitigation for using this ViewHelper in non-extbase context because auf changes in the overall stack and not having a extbase context anywhere anymore by default (because of performance reasons). Therefore, the current provided patch only targets that part and as this is not part of v11 no need to backport it to that version - would not be possible. Otherwise, if this is a issue in v11 already this patch does not cover the "extbase context" variant (which would be at least the part backportable removing the v12+ part during the backport). Reading the issue, it has been reported for v12. -
core-ci voted on patch set 3 V +1 10/04/23, 09:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47385
-
Daniel Corn voted on patch set 3 CR +1 10/04/23, 09:21
-
Stefan Bürk updated the commit message in patch set 4
CR +1V +110/04/23, 09:25 -
Stefan Bürk commented on patch set 4 CR -1 10/04/23, 09:26
I would say we should add some tests for this. Will have look for that when testing this patch and add one.
-
core-ci voted on patch set 4 V +1 10/04/23, 09:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47386
-
Stefan Bürk commented on patch set 4 10/04/23, 13:47
That's not the correct fix, I would say. First, using the typoLink/LinkFactory in FE context for non-extbase has been added as a mitigation and the goal should be to provide the same behaviour as before using the extbase UriBuilder. And therefore, the "target" determined by the LinkFactory in that case needs to be removed to keep the same behaviour. Otherwise, the ViewHelper would behave differently between extbase and non-extbase context. The target tag attribue is handled directly if not overriden. Will push a proper change along with tests for it. -
Stefan Bürk uploaded patch set 5
CR -1V +110/04/23, 13:53 -
core-ci voted on patch set 5 V +1 10/04/23, 14:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47403
-
Stefan Bürk uploaded patch set 6
V +110/05/23, 07:54 -
Stefan Bürk updated the commit message in patch set 7 10/05/23, 07:55
-
Stefan Bürk commented on patch set 7 10/05/23, 07:57
Reply
I changed the patch to use the more proper solution for this.Reply
Was a good point. By adding tests it came up that the solution needs to be another one.@HelmutStrasser and @DanielCorn Can you pleas test if the changed solution works for you ? -
core-ci voted on patch set 6 V +1 10/05/23, 08:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47420
-
core-ci voted on patch set 7 V +1 10/05/23, 08:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47421
-
Stefan Bürk commented on patch set 7 10/05/23, 09:16
Reply
Done -
Daniel Corn commented on patch set 7 CR +1 10/05/23, 10:43
Reply
I can't reproduce the error for `f:link.action` View Helper. The `f:link.page` link looks good. -
Stefan Bürk commented on patch set 7 10/05/23, 12:24
Reply
You need to link from a non-extbase context to a exbase action in the frontend. The logic is the same. In the end, the added tests shows and covers that for both viewhelper. -
Daniel Corn commented on patch set 7 10/05/23, 14:27
Reply
If I try that (in TYPO3 12.4.5) I get the following error message: ``` ViewHelper f:link.action can be used only in extbase context and needs a request implementing extbase RequestInterface. ``` -
Stefan Bürk commented on patch set 7 10/05/23, 14:33
Reply
In a non-extbase context all extbase arguments needs to be provided for the viewhelper - there is no auto-resolving of extbase aruments (per performance reasons). And that is the rason why LinkFactory is used in this case (and introduced the changed behaviour like for the page viewhelper). See the test for example: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81312/7/typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/ActionViewHelperTest.php#116 ``` <f:link.action pageUid="3" target="home" extensionName="examples" pluginName="haiku" controller="Detail" action="show">link me</f:link.action> ``` -
Daniel Corn commented on patch set 7 10/05/23, 16:09
Reply
Had to update to 12.4.6. The bug is fixed for `f:link.action` too. Thanks! -
Simon Schaufelberger updated the commit message in patch set 8
CR +1V +110/05/23, 22:04 -
Stefan Bürk updated the commit message in patch set 9 10/05/23, 22:07
-
core-ci voted on patch set 8 V -1 10/05/23, 22:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47450
-
core-ci voted on patch set 9 V -1 10/05/23, 22:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47451
-
Stefan Bürk rebased onto patch set 10
V -110/06/23, 01:42 -
core-ci voted on patch set 10 V +1 10/06/23, 01:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47453
-
Benjamin Franzke voted on patch set 10 CR +1 10/06/23, 13:18
-
Benjamin Franzke commented on patch set 10 V +1 10/06/23, 14:17
I think in general Extbase should be fixed to properly respect the configured target of a page. But for BC reasons I'd say fine to fix it this way – but we should/might fix it it the other way around for TYPO3 >= v13 later. -
Stefan Bürk commented on patch set 10 V +2 CR +2 10/06/23, 14:24
Reply
Ack. -
Stefan Bürk merged patch set 11 10/06/23, 14:54