Issue Bug Closed

#101709TypoLink forceAbsoluteUrl is not working anymore on processed image resources from static files

Oliver Hader 08/18/23, 13:24 updated 07/09/24, 14:15

Description

page = page
page {
    meta {
        twitter:image {
            attribute = property
            cObject = TEXT
            cObject {
                typolink.parameter.cObject = IMG_RESOURCE
                typolink.parameter.cObject {
                    file = EXT:site/Resources/Public/Images/indie-logo-inverted.png
                    file.width = 1200m
                    file.height = 628m
                }
                typolink.forceAbsoluteUrl = 1
                typolink.returnLast = url
            }
        }
    }
}
  • the generated result of IMG_RESOURCE is something like /typo3temp/assets/_processed_/8/e/csm_indie-logo-inverted_f323361c00.png
  • LegacyLinkNotationConverter considers this to be handled by LinkService::TYPE_URL, since it was generated in the root-file-storage (storage-uid=0)
  • ExternalUrlLinkBuilder (used for LinkService::TYPE_URL) does not consider forceAbsoluteUrl

This results in the incorrect output of having:

<meta name="twitter:image" content="/typo3temp/assets/_processed_/8/e/csm_indie-logo-inverted_f323361c00.png" />

But, it actually should contain the domain as well:

<meta name="twitter:image" content="https://indiemusik-festival.de/typo3temp/assets/_processed_/8/e/csm_indie-logo-inverted_f323361c00.png" />

Reviews 2