Issue Bug Closed

#54884RootlineUtility does not consider foreign_sorting for relation fields

Markus Klein 01/09/14, 19:37 updated 07/12/19, 11:22

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.

Reviews 2