Bug #54884
closed
RootlineUtility does not consider foreign_sorting for relation fields
Added by Markus Klein over 10 years ago.
Updated almost 5 years ago.
Description
Problem
RootlineUtility ::enrichWithRelationFields does not consider the TCA setting foreign_sorting.
Hence it is not possible to retrieve media elements of pages via typoscript in the correct order.
Example
Add two images as media to a page in BE.
Use this Typoscript snippet:
page.15 = COA
page.15 {
20 = IMG_RESOURCE
20.stdWrap.wrap = <div><img src="|" /></div>
20.file {
import.data = levelmedia: -1
import.listNum = 0
treatIdAsReference = 1
}
30 = IMG_RESOURCE
30.stdWrap.wrap = <div><img src="|" /></div>
30.file {
import.data = levelmedia: -1
import.listNum = 1
treatIdAsReference = 1
}
}
Before the patch the images will always have the same display order, no matter how you sort them in the page properties.
- Status changed from Accepted to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Sorting might be fixed, but data = levelmedia:-1, slide does not only catch media from the particular page but also from LOWER pages.
home
.
.--sub1
.--sub2
when using levelmedia:-1 in home (with media selected), it also catches media from sub1 and sub2 additionally! That is incorrect.
#lib.sliderimages = COA
#lib.sliderimages {
- 1 = COA
- 1 {
- stdWrap.required=1
- stdWrap.outerWrap.cObject = TEXT
- stdWrap.outerWrap.cObject.value = '|',
- 2 = IMG_RESOURCE
- 2 {
- file {
- import.data = levelmedia: -1
- treatIdAsReference = 1
- import.listNum = 0
- }
- }
- }
- 2 < .1
- 2.2.file.import.listNum = 1
- 3 < .1
- 3.2.file.import.listNum = 2
- 4 < .1
- 4.2.file.import.listNum = 3
- 5 < .1
- 5.2.file.import.listNum = 4
#}
Fritz please create a separate issue for that.
Please also have a look at the text formatting help here, this helps a lot for us to read the code more easily.
- Status changed from Resolved to Closed
This seems to be still present in 9.5.8. What's missing here that should go into a new report? Or can you open this report again?
(I think #71973 and #46383 are duplicates.)
- Related to Bug #46383: levelmedia ignores sorting of media records added
- Related to Bug #71973: Sorting of file relations doesn't have any effect in a workspace added
Also available in: Atom
PDF