Issue Bug Closed

#108338f:link.action broken since 13.4.20

Udo Klingner 11/27/25, 09:23 updated 12/02/25, 11:48

Description

Since TYPO3 version 13.4.20, the ViewHelper `link.action` no longer works correctly. If the ID of the jump marker is entered in the `section` parameter, the following error message appears:

TypeError
TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::setSection(): Argument #1 ($section) must be of type string, int given, called in /var/www/masterconfig13.dev.local.ble.de/htdocs/vendor/typo3/cms-fluid/Classes/ViewHelpers/Uri/ActionViewHelper.php on line 221

The ViewHelper only works again after I add a “c” before the ID.
I hope this isn’t a breaking change… :(

Reviews 1

History 1012

  1. Markus Klein changed assigned to Markus Klein priority Should have Must have 11/27/25, 09:29

  2. Markus Klein commented and changed priority Must have Should have 11/27/25, 09:31

    First off, I’ll take a look, but in general, a section may not be a number. HTML-ids are required to start with a character.
    So this was probably invalid before.

    Will check, if we restore original behavior in core or not.

  3. Udo Klingner commented 11/27/25, 10:15

    f:link.page, for example, only expects the ID for ‘section’. I think it should be kept consistent for all ViewHelpers. Breaking changes within an LTS version are not good.

  4. Markus Klein commented 11/27/25, 12:50

    > f:link.page, for example, only expects the ID for ‘section’.

    Yey… yet another inconsistency.

    > Breaking changes within an LTS version are not good.

    … were not intended, you can be sure.

  5. Markus Klein commented 11/27/25, 12:57

    I now checked those viewhelpers: uri/link.action/page

    The section argument is specified as “string” in all of them. So that’s correct.

    A section must be a valid HTML-id attribute value, so number-only is invalid HTML.
    So to be clear, your use case is actually invalid, from what I can see.

    But what’s interesting on a different perspective: How you end up with a datatype “int”, when the argument is correctly registered as being string.
    Which Fluid version do you run?

  6. Udo Klingner commented 11/27/25, 14:04

    > Which Fluid version do you run?

    typo3fluid/fluid 4.5.0
    it’s automatic installed with composer

  7. Markus Klein commented 11/27/25, 14:07

    Roger. I can reproduce the data type error with core tests.

    So yes, this is indeed non-intended change of behavior in the argument-processing, but will actually not cause any problems if you use valid HTML.

    Never the less, I’m going to provide a bugfix for this.

  8. Markus Klein commented and changed status New Needs Feedback 11/27/25, 14:22

    I analyzed the change and the “section” attribute is the only one that’s affected by a “missing” string cast.
    But as said above, a number is actually not an allowed value within HTML.

    So question is: What’s your use case that has numbers only here?

  9. Gerrit Code Review pushed patch set 1 for 13.4 to change 91917 status Needs Feedback Under Review 11/27/25, 15:52

  10. Gerrit Code Review pushed patch set 2 for 13.4 to change 91917 11/27/25, 15:54

  11. Markus Klein commented and changed status Under Review Resolved done 0 % 100 % 11/27/25, 16:30

    Applied in changeset commit:3d1fa7f63f90f6383ce411e97a79bf998135548c.

  12. Benni Mack changed status Resolved Closed 12/02/25, 11:48