Bug #95997
closedlevelmedia not working with TYPO3 11.5.3 and disabled file relations
100%
Description
Since TYPO3 version 11.5.3 "levelmedia" is not working anymore if there are disabled file relations in pages.media.
Example code:
foo = FILES foo.references.data = levelmedia:-1
Error message:
(1/1) #1317178794 TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException No file reference (sys_file_reference) was found for given UID: "53"
If you delete the disabled file relations it works. It also works with following TS code:
references { table = pages fieldName = media uid.data = page:uid }
Updated by Oliver Hader over 2 years ago
- Status changed from New to Needs Feedback
To which sys_file.identifier
and sys.file.storage
is sys_file_reference:53
pointing to? There had been some changes for the "zero-storage", e.g. used like 0:/typo3conf/some_ext/Resources/Public/whatever.png
...
Updated by Dirk Sch. over 2 years ago
Well ... it's pointing (in my case) to a file in user_upload a editor added through backend.
This typoscript example from documentation doesn't work anymore with any file, if a media in page resource is disabled.
This affects many installations.
Usage with sliding
One usual feature is to use images attached to pages and use them up and down the page tree, a process called “sliding”.
lib.banner = FILES lib.banner { references { data = levelmedia: -1, slide } renderObj = IMAGE renderObj { file.import.dataWrap = {file:current:storage}:{file:current:identifier} altText.data = file:current:title wrap = <div class="banner">|</div> } }
Updated by Simon Würstle over 2 years ago
Oliver Hader wrote in #note-2:
To which
sys_file.identifier
andsys.file.storage
issys_file_reference:53
pointing to? There had been some changes for the "zero-storage", e.g. used like0:/typo3conf/some_ext/Resources/Public/whatever.png
...
It's pointing to 1:/user_upload/foobar.jpg
Storage 1 is the public folder "fileadmin" (default storage).
Updated by Gerrit Code Review over 2 years ago
- Status changed from Needs Feedback to Under Review
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72273
Updated by Gerrit Code Review over 2 years ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72273
Updated by Benni Mack over 2 years ago
Simon Würstle wrote in #note-4:
Oliver Hader wrote in #note-2:
To which
sys_file.identifier
andsys.file.storage
issys_file_reference:53
pointing to? There had been some changes for the "zero-storage", e.g. used like0:/typo3conf/some_ext/Resources/Public/whatever.png
...It's pointing to 1:/user_upload/foobar.jpg
Storage 1 is the public folder "fileadmin" (default storage).
Hey Simon,
I ran into the same issue and created a patch which solved the issue for me.
Updated by Gerrit Code Review over 2 years ago
Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72273
Updated by Gerrit Code Review over 2 years ago
Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72273
Updated by Gerrit Code Review over 2 years ago
Patch set 1 for branch 11.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/+/72417
Updated by Benni Mack over 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8583e6ac64f2918f022e776063e93881005bbc7d.