Bug #39904

Unresized image not displayed in FE after move in filelist

Added by internezzo ag almost 3 years ago. Updated over 2 years ago.

Status:Resolved Start date:2012-08-17
Priority:Must have Due date:
Assigned To:Steffen Ritter % Done:

100%

Category:File Abstraction Layer (FAL) Spent time: -
Target version:6.0.0-RC1
TYPO3 Version:6.0 Is Regression:
PHP Version: Sprint Focus:
Complexity:

Description

When an image is moved in the filelist which is used unresized in a content element (CE), the wrong path is used in the FE.

Steps to reproduce:
  1. Create folder test1 and test2 and upload an image to test1
  2. Create CE with type image and integrate the image
  3. Check FE: image is directly linked to fileadmin/user_upload/test1/image.jpg
  4. Move image to test2 folder in filelist
  5. Clear cache / reindex FAL with scheduler task
  6. Check FE: image is still linked to test1 folder --> image is not displayed
  7. Edit CE: resize image
  8. Check FE: image is displayed correctly from processed folder
  9. Move image back and forth: FE remains intact as long as the image is resized

Related issues

related to Core - Bug #40033: Relation lost after renaming folder Resolved 2012-08-21
related to Core - Bug #40669: FAL files get reindexed in storage null when used with tt... Resolved 2012-09-06
blocked by Core - Bug #43059: File processing is broken Resolved 2012-11-17

Associated revisions

Revision 66c204f0
Added by Andreas Wolf over 2 years ago

[TASK] Refactor FAL file processing

File processing is a central part of TYPO3's file usage, as e.g. all
images in content elements have to be resized when they don't fit the
requirements. However, the current implementation of file processing
with FAL has several drawbacks and shortcomings, not to mention quite a
few bugs.

This patch brings a completely reworked infrastructure behind the
File Processing Service, while keeping the external API unchanged.

The processing to be done is described in tasks, which are part of a
ProcessedFile's properties. The processing itself is now moved to
processors, which could execute the tasks using different utilities,
e.g. ImageMagick or some cloud image processing service. Currently,
there is only a local image processor implementation, which relies on
ImageMagick/GraphicsMagick (i.e. uses the same configuration as the old
processing).

The processed file class now also supports safe handling of unchanged
files, i.e. files that should have been processed, but didn't need
processing.

Fixes: #43059
Fixes: #39904
Fixes: #40033
Fixes: #40669
Releases: 6.0

Change-Id: I186a46f9923dacd98be655d72be2bd89b43866c2
Reviewed-on: http://review.typo3.org/14310
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel

History

#1 Updated by Andreas Wolf almost 3 years ago

  • Status changed from New to Needs Feedback

What I don't get from your description: Did you move the file manually or by using FAL methods? Because the former method might sometimes break stuff, though we have taken some measures to ensure consistency of the file index; the latter should definitely not break anything. Maybe this issue is related to #40033 - we'll have to check that.

#2 Updated by Marcel Burkhalter almost 3 years ago

I moved the file in the backend module filelist.

#3 Updated by Andreas Wolf almost 3 years ago

Ok. Could you check if the index record in sys_file is updated, i.e. if the identifier of the file is changed to .../test2/...? This should normally happen, but maybe something is broken here.

#4 Updated by Andreas Wolf almost 3 years ago

Andreas Wolf wrote:

Ok. Could you check if the index record in sys_file is updated, i.e. if the identifier of the file is changed to .../test2/...? This should normally happen, but maybe something is broken here.

Forget what I said here... I found the reason for this bug: Even for files where no processing is applied (because they don't have to be resized etc.), a ProcessedFile object is created and linked to the content record. This record points to the original location of the file, but is not updated when the file is moved. Thus the relation breaks.

A solution could be to simply not create the ProcessedFile altogether when a file is not changed. I don't know why it happens at all or why there is no check if the file has been processed before creating the record...

#5 Updated by Andreas Wolf almost 3 years ago

  • Category set to Frontend
  • Status changed from Needs Feedback to Accepted
  • Target version set to 6.0 final

#6 Updated by Andreas Wolf almost 3 years ago

  • Project changed from File Abstraction Layer to Core
  • Category changed from Frontend to Frontend
  • Target version deleted (6.0 final)

#7 Updated by Andreas Wolf almost 3 years ago

  • Category changed from Frontend to File Abstraction Layer (FAL)
  • TYPO3 Version set to 6.0

#8 Updated by Gerrit Code Review almost 3 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14310

#9 Updated by Steffen Ritter almost 3 years ago

  • Assigned To set to Steffen Ritter

#10 Updated by Steffen Ritter almost 3 years ago

  • Target version set to 6.0.0-beta2

#11 Updated by Gerrit Code Review almost 3 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14310

#12 Updated by Gerrit Code Review almost 3 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14310

#13 Updated by Gerrit Code Review almost 3 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14310

#14 Updated by Steffen Ritter almost 3 years ago

  • Status changed from Under Review to On Hold

processed files handling is completely in rewrite

#15 Updated by Gerrit Code Review almost 3 years ago

  • Status changed from On Hold to Under Review

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14310

#16 Updated by Gerrit Code Review almost 3 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14310

#17 Updated by Gerrit Code Review almost 3 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14310

#18 Updated by Steffen Ritter almost 3 years ago

  • Target version changed from 6.0.0-beta2 to 6.0.0-RC1

#19 Updated by Gerrit Code Review over 2 years ago

Patch set 8 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14310

#20 Updated by Gerrit Code Review over 2 years ago

Patch set 9 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14310

#21 Updated by Gerrit Code Review over 2 years ago

Patch set 10 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14310

#22 Updated by Gerrit Code Review over 2 years ago

Patch set 11 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14310

#23 Updated by Gerrit Code Review over 2 years ago

Patch set 12 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14310

#24 Updated by Gerrit Code Review over 2 years ago

Patch set 13 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14310

#25 Updated by Gerrit Code Review over 2 years ago

Patch set 21 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14310

#26 Updated by Anonymous over 2 years ago

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

Also available in: Atom PDF