Bug #54884

RootlineUtility does not consider foreign_sorting for relation fields

Added by Markus Klein almost 6 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
-
Target version:
Start date:
2014-01-09
Due date:
% Done:

100%

TYPO3 Version:
6.1
PHP Version:
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

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.


Related issues

Related to TYPO3 Core - Bug #46383: levelmedia ignores sorting of media records Closed 2013-03-17
Related to TYPO3 Core - Bug #46383: levelmedia ignores sorting of media records Closed 2013-03-17
Related to TYPO3 Core - Bug #71973: Sorting of file relations doesn't have any effect in a workspace Resolved 2015-11-30
Duplicated by TYPO3 Core - Bug #54913: Sorting of media elements in page->resources not reflected after re-ordering Closed 2014-01-11

Associated revisions

Revision f5e6ed3d (diff)
Added by Markus Klein almost 6 years ago

[BUGFIX] RootlineUtility does not consider foreign_sorting

Make sure RootlineUtility::enrichWithRelationFields() does take
the TCA setting foreign_sorting into account when fetching
foreign data for the rootline cache.

Resolves: #54884
Releases: 6.2, 6.1
Change-Id: I6f8323bd5a99f9009820332c220a5637e0930712
Reviewed-on: https://review.typo3.org/26727
Reviewed-by: Robert Wildling
Tested-by: Robert Wildling
Reviewed-by: Steffen Ritter
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Markus Klein
Tested-by: Markus Klein

Revision ae547690 (diff)
Added by Markus Klein almost 6 years ago

[BUGFIX] RootlineUtility does not consider foreign_sorting

Make sure RootlineUtility::enrichWithRelationFields() does take
the TCA setting foreign_sorting into account when fetching
foreign data for the rootline cache.

Resolves: #54884
Releases: 6.2, 6.1
Change-Id: I6f8323bd5a99f9009820332c220a5637e0930712
Reviewed-on: https://review.typo3.org/26971
Reviewed-by: Markus Klein
Tested-by: Markus Klein

History

#1 Updated by Gerrit Code Review almost 6 years ago

  • Status changed from Accepted 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/26727

#2 Updated by Gerrit Code Review almost 6 years ago

Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26971

#3 Updated by Markus Klein almost 6 years ago

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

#4 Updated by Fritz Welter over 5 years ago

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. 1 = COA
  2. 1 {
  3. stdWrap.required=1
  4. stdWrap.outerWrap.cObject = TEXT
  5. stdWrap.outerWrap.cObject.value = '|',
  6. 2 = IMG_RESOURCE
  7. 2 {
  8. file {
  9. import.data = levelmedia: -1
  10. treatIdAsReference = 1
  11. import.listNum = 0
  12. }
  13. }
  14. }
  15. 2 < .1
  16. 2.2.file.import.listNum = 1
  17. 3 < .1
  18. 3.2.file.import.listNum = 2
  19. 4 < .1
  20. 4.2.file.import.listNum = 3
  21. 5 < .1
  22. 5.2.file.import.listNum = 4
    #}

#5 Updated by Markus Klein over 5 years ago

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.

#6 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

#7 Updated by bitfire it services 4 months ago

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.)

#8 Updated by Markus Klein 4 months ago

@bitfire

New issue please with a relation to this ticket. Thanks.

#9 Updated by Benni Mack about 2 months ago

  • Related to Bug #46383: levelmedia ignores sorting of media records added

#10 Updated by Benni Mack about 2 months ago

  • Related to Bug #71973: Sorting of file relations doesn't have any effect in a workspace added

Also available in: Atom PDF