Project

General

Profile

Actions

Bug #86362

closed

Inserted images are not allways ordered alphabetically

Added by Claude Unterleitner over 5 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2018-09-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When adding more than 40 images at once in a content element text/media which have already been saved on the (linux) server, the original alphabetical ordering is not always kept: Randomly one or more images are added somewhere between the other images ignoring the original superior alphabetical ordering of mostly all other images. Trying to insert the images several times leads to completely different positions of the wrong sorted images (90 to 95 % of the images are correctly ordered).

Paradoxically in my tries, I had two times testet first a correct order when trying from a linux (Ubuntu) operation system, but when then trying it from a windows client system, the ordering was not correct as described, and when then retrying from the linux operation system again, the ordering there was also not correct when adding this huge amount of images. So it has perhaps to do with a kind of caching?


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #59341: Provide progress indicator while image-processing FAL uploadsClosed2014-06-04

Actions
Actions #1

Updated by Claude Unterleitner over 5 years ago

  • Subject changed from Inserted images are not allwas ordered alphbetically to Inserted images are not allwas ordered alphabetically
Actions #2

Updated by Bernd Wilke over 5 years ago

do you use Drag&Drop?

windows priorizes the file/item where you dragged (mousedown) the selection and inserts them first. sometimes the order of marking the items is used. In this way it is an error of windows and TYPO3 can not do anything.

Actions #3

Updated by Claude Unterleitner over 5 years ago

thank you for your answer. And no, I don't use drag&drop.

Actions #4

Updated by Claude Unterleitner over 5 years ago

  • Subject changed from Inserted images are not allwas ordered alphabetically to Inserted images are not allways ordered alphabetically
Actions #5

Updated by Susanne Moog about 4 years ago

  • Status changed from New to Needs Feedback

The order is not alphabetic because why should it be? ordering of images in an element is done via dragging images in the correct order. When uploading multiple files at once, multiple requests start at the same time and every image gets added once it is uploaded completely. The requests are started in the order given (which depends on the operating system and on whether or not drag and drop is used), but depending on the size and connection speed, they may finish at very different times.

Actions #6

Updated by Claude Unterleitner about 4 years ago

@Susanne:
Thank you for your answer. First of all, I'm not speaking from the uploading process but from the process when adding images to a content element text/media. I think this process is independent from the operating system, or not?

My background: One of my clients, a big bicycle association with several regional sub units (called "Kreisverbände"), has many photo galleries of bicycle tours on his website where the ordering of the photos is important (should always be from begin of a tour to the end). When uploading 50 or more photos, it's very annoying for the editors (most of them are working voluntary), when they always have to correct the order of the photos after adding them to a content element text/media. Surely I could try an image gallery plugin but I always prefer to use core methods because it's easier to understand for the editors.

Another solution would be to use the file list content element, because the files can be ordered by title, but I think it's originally thought for listing download links and not for creating a photo gallery...

Actions #7

Updated by Claude Unterleitner about 4 years ago

  • TYPO3 Version changed from 8 to 9

tested with TYPO3 V8 and V9

Actions #8

Updated by Andreas Kienast about 4 years ago

  • Status changed from Needs Feedback to Accepted

The problem here is that the images are associated with an inline element, each element is created via a separate AJAX call which creates such timing issues. I currently have no clue how to solve this in a sane way.

Actions #9

Updated by Susanne Moog about 4 years ago

Claude Unterleitner wrote:

Another solution would be to use the file list content element, because the files can be ordered by title, but I think it's originally thought for listing download links and not for creating a photo gallery...

Thanks for your answer.

One way to go could be to add the functionality from the files element (or the bootstrap package) to allow adding file collections / folders and sorting to the images / media elements.

I don't exactly see a solution for the ajax requests as Andy stated, however the use case is very valid and we should have a solution.

Actions #10

Updated by Gerrit Code Review about 4 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/c/Packages/TYPO3.CMS/+/63838

Actions #11

Updated by Susanne Moog about 4 years ago

Ok, so I was kind of curious and wanted to try my suggestion, I did the following:

Changed the TypoScript of the image content element to:

tt_content.image {
         10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
         10 {
             references.fieldName = image
+            collections.field = file_collections
+            sorting.field = filelink_sorting
+            sorting.direction.field = filelink_sorting_direction
         }
}

Changed showitem of GallerySettings to

--- a/typo3/sysext/frontend/Configuration/TCA/tt_content.php
+++ b/typo3/sysext/frontend/Configuration/TCA/tt_content.php
@@ -1924,7 +1924,12 @@ return [
             'label' => 'LLL:EXT:frontend/Resources/Private/Language/Database.xlf:tt_content.palette.gallerySettings',
             'showitem' => '
                 imageorient;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:imageorient_formlabel,
-                imagecols;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:imagecols_formlabel
+                imagecols;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:imagecols_formlabel,
+                --linebreak--,
+                file_collections;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:file_collections.ALT.uploads_formlabel,
+                --linebreak--,
+                filelink_sorting,
+                filelink_sorting_direction,
             ',
         ],

(both can be achieved in a site extension with TypoScript and TCA overrides).

Now I can select file collections and sorting options and the frontend renders them as if I added the images one-by-one. So until the patch from Andy is done, you can use this very easily (and it might even be easier in the long run, as editors can organize their pictures in a folder and "just" select that folder and a sorting).

Actions #12

Updated by Gerrit Code Review about 4 years 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/+/63838

Actions #13

Updated by Gerrit Code Review about 4 years 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/+/63838

Actions #14

Updated by Gerrit Code Review about 4 years ago

Patch set 4 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/+/63838

Actions #15

Updated by Susanne Moog about 4 years ago

  • Related to Feature #59341: Provide progress indicator while image-processing FAL uploads added
Actions #16

Updated by Andreas Fernandez about 4 years ago

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

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF