Project

General

Profile

Actions

Bug #95493

closed

TS layoutKey adds double slashes to srcset

Added by Simon Würstle about 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Start date:
2021-10-06
Due date:
% Done:

100%

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

Description

An image output with typoscript object of type IMAGE and setting a layoutKey generates double slashes to the srcset URLs (TYPO3 11.5). This did not happen in TYPO3 11.4 and below.

foo = IMAGE
foo {
    file {
        import.data = file:current:uid
        treatIdAsReference = 1
    }
    layoutKey = srcset-default
    layout {
        srcset-default {
            element (
<img width="###WIDTH###" height="###HEIGHT###" src="###SRC###" srcset="###SOURCECOLLECTION###" sizes="(max-width: ###WIDTH###px) 100vw, ###WIDTH###px" ###PARAMS### ###ALTPARAMS### ###SELFCLOSINGTAGSLASH###>
            )
            source = ###SRC### ###WIDTH###w###SRCAPPEND###
        }
    }
    sourceCollection {
        normal {
            srcappend = ,
        }
        hdpi {
            pixelDensity = 2
            quality = 70
        }
    }
}

Output:

<img width="300" height="200" src="/foobar.jpg" srcset="//foobar.jpg 300w,//foobar2.jpg 600w" sizes="(max-width: 300px) 100vw, 300px" alt="">

Actions #1

Updated by Benni Mack about 3 years ago

  • Target version changed from 11 LTS to Candidate for patchlevel
Actions #2

Updated by Gerrit Code Review about 3 years ago

  • Status changed from New to Under Review

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

Actions #3

Updated by Gerrit Code Review about 3 years ago

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

Actions #4

Updated by Gerrit Code Review about 3 years ago

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

Actions #5

Updated by Gerrit Code Review about 3 years ago

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

Actions #6

Updated by Gerrit Code Review about 3 years ago

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

Actions #7

Updated by Gerrit Code Review about 3 years ago

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

Actions #8

Updated by Anonymous about 3 years ago

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

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF