Bug #43101

File relations are broken for import. in IMAGE cObject

Added by Nicole Cordes almost 8 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2012-11-19
Due date:
% Done:

100%

TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

While trying to show an image link in pages/media I recognised FAL can't handle relations in IMAGE / file.import

I debugged it and found out, that in the field pages/media the uid of the reference relation is stored while FAL tries to load the image with that uid (ContentObjectRenderer::getImgResource)

Line 5041 should maybe turned into
$fileObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getFileReferenceObject($file)->getOriginalFile();

IMHO this drops the functionality to insert files without any relation. So maybe it would be better to introduce a new TS property (isReference = 1) and handle that correctly.


Related issues

Related to TYPO3 Core - Bug #43984: Add missing stdWrap to treatIdAsReference Closed 2012-12-14

Associated revisions

Revision 3903ee02 (diff)
Added by Nicole Cordes almost 8 years ago

[BUGFIX] IMG_RESOURCE not capable of sys_file_reference

The file.import function can't handle file relations. Sometimes
you have to deal with uids of sys_file_references instead of
sys_file uids. One prominent case is import.data = levelmedia
This patch adds an flag to IMG_RESOURCE with that, a given uid
is interpreted as reference instead of file uid.

Change-Id: I4699d9e38b9a809fd194d33344678a64168d4300
Fixes: #43101
Releases: 6.0
Documentation: #43283
Reviewed-on: http://review.typo3.org/16584
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes
Reviewed-by: Stefan Neufeind
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel

History

#1 Updated by Andreas Wolf almost 8 years ago

  • Category set to File Abstraction Layer (FAL)
  • Status changed from New to Accepted

#2 Updated by Andreas Wolf almost 8 years ago

  • Subject changed from FAL doesn't handle .import functionality to File relations are broken for import. in IMAGE cObject

#3 Updated by Gerrit Code Review almost 8 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/16584

#4 Updated by Gerrit Code Review almost 8 years ago

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

#5 Updated by Gerrit Code Review almost 8 years ago

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

#6 Updated by Gerrit Code Review almost 8 years ago

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

#7 Updated by Gerrit Code Review almost 8 years ago

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

#8 Updated by Gerrit Code Review almost 8 years ago

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

#9 Updated by Gerrit Code Review almost 8 years ago

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

#10 Updated by Nicole Cordes almost 8 years ago

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

#11 Updated by Riccardo De Contardi about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF