Project

General

Profile

Actions

Bug #105341

open

Unable to hide media resources in page properties (media) if more than one

Added by Dirk Sch. about 2 months ago. Updated about 2 months ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2024-10-18
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If more than one media resource exists on a page, it is not possible to hide e.g. the second media file.

If you upgrade any existing TYPO3 12 installation to 13 LTS with hidden media resources, the output of files fails with "No file reference (sys_file_reference) was found for given UID: xy".

How to reproduce:

On a fresh TYPO3 13 installation add a page, add 2 media resources in page properties and try to disable the second.
On existing installations set one file resource in table "sys_file_reference" with same pid to hidden,

<f:for each="{images}" as="image">
<f:image image="{image}" />
</f:for>

will fail.


Files

Backend.gif (1.04 MB) Backend.gif Dirk Sch., 2024-10-18 09:20
Actions #1

Updated by Garvin Hicking about 2 months ago

  • Category set to Frontend
  • Status changed from New to Needs Feedback

How exactly do you retrieve the pages.media relations in your frontend?

Actions #2

Updated by Dirk Sch. about 2 months ago

TS:
lib.slider = FLUIDTEMPLATE
lib.slider {
file = EXT:my_base/Resources/Private/Templates/Slider.html
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
10 {
references{
table = pages
uid.data = page:uid
fieldName = media
data = LEVELMEDIA: -1, slide
}
as = images
}
}
settings {
width = 1920
height = 1200
}
}

Fluid in Slider.html:
<f:for each="{images}" as="image">
<f:image image="{image}" width="1920c" height="700c"/>
</f:for>

Actions #3

Updated by Dirk Sch. about 2 months ago

Maybe the desciption is not clear enough. Besides the frontend, it is not possible to hide the pages.media on a fresh install in the backend. 1 file works, if you add a second one, you can not hide that file with the backend.

Actions #4

Updated by Garvin Hicking about 2 months ago

  • Category changed from Frontend to FormEngine aka TCEforms
  • Status changed from Needs Feedback to Accepted

These may be two issues actually, I'm not sure yet.

I can reproduce this in v13 somehow. Only when having one invisible item, and then inserting from the popup, and then trying to hide the last item it doesn't work. Even if I enable the first one again, I cannot disable the second.

Only if I switch the order of first and second item and then save, it all becomes togle-able again.

I haven't tried to reproduce the frontend now. This needs further inspecting.

I've set this to "FormEngine" for now, in the hopes that "just" formEngine serializes wrong data into sys_file_reference and this affects both backend and frontend.

Actions

Also available in: Atom PDF