Bug #48113
closedtyposcript FILES object always uses default language when accessing page resource images of translated images
0%
Description
When using images in page resources, the FILES typoscript object fails to use the translated version of these images - it allways uses the ones from the default language.
For example we have a page in the default language which is translated in another language (i.E. in english, L=1). We have some images in "page->properties->resources" of the default language and also some images in the english language of this page. This all works well, but when we try to output the images of the page resource, the FILES object allways outputs the images of the default language page, even if we output the english page (but it should use the english images).
This bug can be reproduced by the following typoscript:
page = PAGE
page.10 = TEMPLATE
page.10.subparts.TOPPICS = FILES
page.10.subparts.TOPPICS {
references {
table = pages
uid.data = leveluid:-1, slide
fieldName = media
}
renderObj = COA
renderObj {
wrap = <div class="item">|</div>
# output images
10 = IMAGE
10 {
file.import.data = file:current:publicUrl
altText.data = file:current:title
}
# output the description of the images
20 = TEXT
20 {
data = file:current:description
wrap = <div class="item-text">|</div>
}
}
}
config {
# language Default
linkVars = L
uniqueLinkVars = 1
sys_language_mode = content_fallback
htmlTag_langKey = de
language = de
locale_all = de_DE.UTF-8
sys_language_uid = 0
}
[globalVar = GP:L = 1]
config {
htmlTag_langKey = en
language = en
locale_all = en_EN.UTF-8
sys_language_uid = 1
}
[global]
Then create a subpart "TOPPICS" in the template and add images in the page resource of the default language and the english one.