Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2021-11-16
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

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
}
Actions #1

Updated by Dirk Sch. over 2 years ago

  • Is Regression set to Yes
Actions #2

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...

Actions #3

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>
    }
}
Actions #4

Updated by Simon Würstle over 2 years ago

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).

Actions #5

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

Actions #6

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

Actions #7

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 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.

Actions #8

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

Actions #9

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

Actions #10

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

Actions #11

Updated by Benni Mack over 2 years ago

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

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF