Project

General

Profile

Actions

Bug #102246

closed

Conflicting parameters in UriBuilder

Added by Bill Dagou about 1 year ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2023-10-25
Due date:
% Done:

100%

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

Description

This may not be a real bug, but could be improved in the future, feel free to change the Tracker to whatever it fits. And, I believe it exists in the previous versions too.

I found this when I was working on a dropdown list providing the export links, formats is an array of the format people can export, including PDF, CSV, Excel.

<ul class="dropdown-menu">
    <f:for each="{formats}" as="format">
        <li>
            <a class="dropdown-item" href="{f:uri.action(action: 'export', arguments: '{format: format}')}">Download {format}</a>
        </li>
    </f:for>
</div>

It's expected to get the $format parameter in the action code with the template file Export.html. However, it failed, because the TemplateView will look for the Export.[format] template instead, which means {f:uri.action(action: 'export', arguments: '{format: format}')} equals to {f:uri.action(action: 'export', format: format)}.

As a developer, I know there won't be an easy fix for this problem, or I can simply use another parameter name in my code, but at least this can be documented somewhere.

Thank you for your time.

Actions #1

Updated by Stefan Bürk 10 months ago

For example, here the format is stated. Basicaly, this is fluidtemplate/extbase 1*1.

https://docs.typo3.org/m/typo3/book-extbasefluid/10.4/en-us/b-ExtbaseReference/Index.html#format

Sadly, it seems to be vanished from the documentation. Therefore, I would suggest to open an
issue in the TYPO3 documentation repositor(ies) on github or contact the documentation team
regarding this issue to document it somewhere again - or better, provide a PR at the place where
you would expect to find this information in a wording it would have helped you.

edit I guess this can be added to the core viewhelper docblock as a hint to avoid using `format`
for custom format argumentes (for the viewhelper) as core patches.

But I think, this could be added as a note at several places.

Actions #2

Updated by Gerrit Code Review 5 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84657

Actions #4

Updated by Bill Dagou 5 months ago

Thank you for your work, really appreciated.

Actions #5

Updated by Gerrit Code Review 5 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84673

Actions #6

Updated by Gerrit Code Review 5 months ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84674

Actions #7

Updated by Garvin Hicking 5 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF