Project

General

Profile

Actions

Bug #104807

closed

getText path broken for extension paths in v12

Added by Andreas Kießling 3 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2024-09-03
Due date:
% Done:

0%

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

Description

Since the second param for sanitize is not set, it does not allow extension paths, thus it won't resolve it.

case 'path':
  try {
    $retVal = GeneralUtility::makeInstance(FilePathSanitizer::class)->sanitize($key);

In v13 there seems to be a new getText option asset https://review.typo3.org/c/Packages/TYPO3.CMS/+/77018

Can this be backported to v12? Otherwise sanitize should be called with allowed extension paths.

The documentation is pretty clear at what path should do: https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/Functions/Data.html#path


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #99203: Re-introduce easy possibility to add paths via TypoScriptClosed2022-11-26

Actions
Actions #1

Updated by Andreas Kießling 3 months ago

  • Related to Feature #99203: Re-introduce easy possibility to add paths via TypoScript added
Actions #2

Updated by Jonas Eberle 3 months ago

Can you give a TypoScript example? I have not noticed a change between v11 and v12.

The only peculiarity (by design, since it generates "TYPO3-paths", not actually URLs) is that it does not output the leading "/" of generated URLs thus I am using it like this:

  xxx = TEXT
  xxx {
    insertData = 1
    value (
<script src="/{path : EXT:configure_cookieman/Resources/Public/JavaScript/trackingobject-youtube-consented.js}"></script>
    )
  }

Of course, getText asset would be great to have in v12 and a backport would be appreciated.

Actions #3

Updated by Andreas Kießling 3 months ago

Hi Jonas,

i tried for about half an hour yesterday and then refactored the code to use a FLUIDTEMPLATE.
Now the other variant also works.. and i also get a leading /

        10 = TEXT
        10.data = path:{$page.favicon.file}
        10.wrap (
            <link type="image/png" href="|" rel="shortcut icon">
        )

Maybe it was just a hickup from the freshly updated instance, i can't reproduce the error now --> Issue can be closed, the code works as expected.

Actions #4

Updated by Garvin Hicking 3 months ago

  • Status changed from New to Resolved

Thanks for the feedback+update, closing as requested :)

Actions #5

Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF