Bug #95997
closed
levelmedia not working with TYPO3 11.5.3 and disabled file relations
Added by Simon Würstle over 2 years ago.
Updated over 1 year ago.
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
}
- 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
...
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>
}
}
Oliver Hader wrote in #note-2:
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
...
It's pointing to 1:/user_upload/foobar.jpg
Storage 1 is the public folder "fileadmin" (default storage).
- Status changed from Needs Feedback to Under Review
Simon Würstle wrote in #note-4:
Oliver Hader wrote in #note-2:
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
...
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.
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF