Issue Bug Closed

#107907Handle package path also in getFileAbsFileName

Benjamin Kott 10/29/25, 12:02 updated 12/02/25, 12:04

Description

A change in the relation chain causes certain path types to be processed earlier than before — for example, in the PageRenderer during preProcessHooks such as:

$GLOBALS[‘TYPO3_CONF_VARS’][‘SC_OPTIONS’][‘t3lib/class.t3lib_pagerenderer.php’][‘render-preProcess’]

Previously, these hooks received the initially set path values.
Now, we are seeing migrated PKG: path identifiers in addition to the traditional file paths.

This is a significant change because there is currently no migration handling for these identifiers — they are being checked manually.
It’s likely an unintended side effect, but it exposes a gap in supporting the new syntax.

Example

New format:
PKG:bk2k/bootstrap-package:Resources/Public/Scss/bootstrap5/theme.scss

Old format:
EXT:bk2k/bootstrap-package/Resources/Public/Scss/bootstrap5/theme.scss

The only difference is the prefix (PKG instead of EXT) and the separator (: instead of /).
The old format was previously supported throughout the system.

Many usages rely on:
GeneralUtility::getFileAbsFileName($file);

Paths like EXT:<path> typically cannot be used directly.<br>As a result, all calls to getFileAbsFileName() — commonly found in extension code — are now affected.</path>

Updating these would require substantial developer effort without adding business value, purely to maintain compatibility.

Reviews 2

History 812

  1. Ayke Halder commented <span data-processor="relativetime" data-value="2025-10-29T17:56:43+00:00" > 10/29/25, 17:56 </span>

    > New format:
    > PKG:bk2k/bootstrap-package:Resources/Public/Scss/bootstrap5/theme.scss
    >
    > Old format:
    > EXT:bk2k/bootstrap-package/Resources/Public/Scss/bootstrap5/theme.scss

    Old format is without vendor-name, isn’t it?
    @EXT:bootstrap-package/Resources/Public/Scss/bootstrap5/theme.scss@

  2. Benjamin Kott commented <span data-processor="relativetime" data-value="2025-10-29T18:08:17+00:00" > 10/29/25, 18:08 </span>

    Ayke Halder wrote in #note-3:
    > > New format:
    > > PKG:bk2k/bootstrap-package:Resources/Public/Scss/bootstrap5/theme.scss
    > >
    > > Old format:
    > > EXT:bk2k/bootstrap-package/Resources/Public/Scss/bootstrap5/theme.scss
    >
    > Old format is without vendor-name, isn’t it?
    > EXT:bootstrap-package/Resources/Public/Scss/bootstrap5/theme.scss

    Both are supported already.

  3. Helmut Hummel commented <span data-processor="relativetime" data-value="2025-10-30T09:33:35+00:00" > 10/30/25, 09:33 </span>

    Benjamin Kott wrote:

    > New format:
    > PKG:bk2k/bootstrap-package:Resources/Public/Scss/bootstrap5/theme.scss
    >
    > Old format:
    > EXT:bk2k/bootstrap-package/Resources/Public/Scss/bootstrap5/theme.scss
    >
    > The only difference is the prefix (PKG instead of EXT) and the separator (: instead of /).

    True. That separator is a subtle but important difference. I makes parsing the identifier possible, without knowing the full list of packages and the package name can be resolved unambiguously.

    Other options that fulfil these criteria have been discussed, yet no better options could be identified as of now.

  4. Helmut Hummel commented <span data-processor="relativetime" data-value="2025-10-30T09:37:23+00:00" > 10/30/25, 09:37 </span>

    Benjamin Kott wrote in #note-4:
    > Ayke Halder wrote in #note-3:
    > > > New format:
    > > > PKG:bk2k/bootstrap-package:Resources/Public/Scss/bootstrap5/theme.scss
    > > >
    > > > Old format:
    > > > EXT:bk2k/bootstrap-package/Resources/Public/Scss/bootstrap5/theme.scss
    > >
    > > Old format is without vendor-name, isn’t it?
    > > EXT:bootstrap-package/Resources/Public/Scss/bootstrap5/theme.scss
    >
    > Both are supported already.

    Canonical usages:

    Old: EXT:<extensionKey>/Relative/Path/To/Resource/
    New: PKG:<composer/package-name>:Relative/Path/To/Resource/

    Since package name and extension key (both as defined by the package author) are currently interchangeable, one can also be used for the other. I would not recommend doing so for now though.

  5. Helmut Hummel commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-11-24T10:00:11+00:00" > 11/24/25, 10:00 </span>

    Applied in changeset commit:1410751ee83af0ac5683a562f666ee3792439ebe.