Bug #71973

Sorting of file relations doesn't have any effect in a workspace

Added by Lorenz Ulrich almost 4 years ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Workspaces
Target version:
-
Start date:
2015-11-30
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Sorting file references, e.g. in a "file links" element, doesn't have any effect in a workspace. After saving, the sorting is just as it was before:

workspaces-fal-sorting.mp4 (433 KB) Lorenz Ulrich, 2015-11-30 10:56

71973.patch View (936 Bytes) Alexander Jahn, 2017-08-02 13:57


Related issues

Related to TYPO3 Core - Task #69967: Extract data overlay handling to common class Closed 2015-09-19
Related to TYPO3 Core - Bug #54884: RootlineUtility does not consider foreign_sorting for relation fields Closed 2014-01-09

Associated revisions

Revision 9737be79 (diff)
Added by Benni Mack about 2 months ago

[BUGFIX] Re-apply sorting after workspaces in FileRepository

When in workspace mode, overlays are made but if there is
a different sorting (reordering of items in a workspace), the
FileRepository does not consider this, as the workspace
overlays are applied later-on.

As this patch is making Workspaces with FAL finally usable, and is
non-intrusive, and fixes a minor data / repository
issue, I consider backporting this down to 8.7 as well.

Resolves: #71973
Releases: master, 9.5, 8.7
Change-Id: Ie230558242e3ebfef541e8eb969fa21dd15708af
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61714
Tested-by: Achim Fritz <>
Tested-by: TYPO3com <>
Tested-by: Daniel Goerz <>
Reviewed-by: Achim Fritz <>
Reviewed-by: Daniel Goerz <>

Revision 4f5b3fe9 (diff)
Added by Benni Mack about 2 months ago

[BUGFIX] Re-apply sorting after workspaces in FileRepository

When in workspace mode, overlays are made but if there is
a different sorting (reordering of items in a workspace), the
FileRepository does not consider this, as the workspace
overlays are applied later-on.

As this patch is making Workspaces with FAL finally usable, and is
non-intrusive, and fixes a minor data / repository
issue, I consider backporting this down to 8.7 as well.

Change-Id: Ic0e993f588880cce21577674c469fd0d1a244697
Resolves: #71973
Releases: master, 9.5, 8.7
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61732
Tested-by: TYPO3com <>
Tested-by: Daniel Goerz <>
Reviewed-by: Daniel Goerz <>

Revision e8956e9a (diff)
Added by Benni Mack about 2 months ago

[BUGFIX] Re-apply sorting after workspaces in FileRepository

When in workspace mode, overlays are made but if there is
a different sorting (reordering of items in a workspace), the
FileRepository does not consider this, as the workspace
overlays are applied later-on.

As this patch is making Workspaces with FAL finally usable, and is
non-intrusive, and fixes a minor data / repository
issue, I consider backporting this down to 8.7 as well.

Resolves: #71973
Releases: master, 9.5, 8.7
Change-Id: Ie230558242e3ebfef541e8eb969fa21dd15708af
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61733
Tested-by: TYPO3com <>
Tested-by: Benni Mack <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Lorenz Ulrich almost 4 years ago

I updated to 6.2.17 to see if #69967 solved the problem. It solved a part of the problem: Sorting files now works in the backend. But in the Workspace preview, the "to-be-published sorting" is not applied.

#2 Updated by Oliver Hader almost 4 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Oliver Hader

How are the relations retrieved in the frontend preview (TypoScript FILES, levelmedia, etc.). It would be great if you could paste the accordant snipped here.
It seems, that the relations are stored correctly but fetching in the frontend scope (still) has problems.
Thanks in advance for your feedback!

#3 Updated by Lorenz Ulrich over 3 years ago

Thanks for your feedback, Oliver.

The files are normal content elements of type Filelinks so AFAIK it's TypoScript FILES / FilesContentObject.

#4 Updated by Viktor Livakivskyi over 3 years ago

I confirm the same issue in TYPO3 7.6
Order of file relations is ok in BE, but isn't applied at FE.
Using css_styled_cointent, tried with "File links" and "Images" CEs.

Interesting part is, that sorting is wrong only in case, when editing already published (LIVE) CE record. If it is a new one (created within a Workspace), all the changed are visible in FE as well.

#5 Updated by Alexander Opitz about 3 years ago

IMHO this sorting issue was resolved in recent TYPO3 updates.
Can you please check again?

#6 Updated by Thorsten Kahler almost 3 years ago

Alexander Opitz wrote:

IMHO this sorting issue was resolved in recent TYPO3 updates.

No, that issue still exists.

#7 Updated by Alexander Opitz over 2 years ago

  • Status changed from Needs Feedback to New

#8 Updated by Alexander Jahn over 2 years ago

I found the same issue today.

The problem is caused by FileRepository::findByRelation selecting file_references and then doing a workspace overlay. The overlay changes the reference's sorting field.

The solution might be to reapply the ordering on all selected items.

I have attached a patch that should solve the issue.

Edit: my patch is against TYPO3 8.7.4

#9 Updated by bitfire it services 4 months ago

Maybe this is the same as #54884?

#10 Updated by Benni Mack about 2 months ago

  • Related to Bug #54884: RootlineUtility does not consider foreign_sorting for relation fields added

#11 Updated by Gerrit Code Review about 2 months ago

  • Status changed from New 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/c/Packages/TYPO3.CMS/+/61714

#12 Updated by Gerrit Code Review about 2 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61714

#13 Updated by Gerrit Code Review about 2 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61714

#14 Updated by Gerrit Code Review about 2 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61732

#15 Updated by Gerrit Code Review about 2 months ago

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

#16 Updated by Benni Mack about 2 months ago

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

Also available in: Atom PDF