Issue Bug Closed

#82844Workspaces + Levelmedia + FILES cObject results in fatal error

Paul Beck 10/23/17, 14:22 updated 09/30/23, 08:04

Description

Hey community,

I’ve found a heavy problem with the components mentioned above.

How to reproduce:

  1. Install “workspaces” extension and create a new workspace
  2. In LIVE workspace add some images to media fields of a page
  3. Switch to the other workspace and just edit anything of the page and save
  4. Push the changes to LIVE

On saving the page in a workspace, the sys_file_reference records will be copied for the workspace with pid “-1”.
When pushing to LIVE, the pid will stay on “-1”.

Now a FILES object like this

lib.headerimage.10 = FILES
lib.headerimage.10 {

    references {
        data = levelmedia: -1, slide
    }

    begin = 0
    maxItems = 1

    renderObj = IMAGE
    renderObj {
        file.import.data = file:current:uid
        file.treatIdAsReference = 1
        file.maxW = 730
        file.maxH = 200
        altText.data = file:current:title
        wrap = <div id="headerimage">| </div>
    }
}

will cause

No file reference (sys_file_reference) was found for given UID: "16326"

Tested in
TYPO3 7.6.20, 7.6.23
PHP 5.6, 7.1

Reviews 2