Issue Bug Closed

#89013SVG inline-Rendering fails due to missing src solving

Thorsten Griebenow 08/26/19, 13:15 updated 04/01/20, 21:14

Description

I need to extract an svg image from the page properties and render it as an inline-SVG to be able to adjust styles afterwards.

For this, I use the typoscript dataProcessor like this:

page.10.dataProcessing {
  20 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
  20 {
    entryLevel = 1
    levels = 1
    expandAll = 1
    includeSpacer = 0
    as = menuCustomersArea
    dataProcessing {
      10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
      10 {
        references.fieldName = media
        as = icon
        if {
          isTrue = {$page.theme.menuCustomersArea.icon.enable}
        }
      }
    }
  }
}

Next in my Fluid template I try to integrate the icons by

<f:cObject typoscriptObjectPath="lib.pageIcon"/>

Now, the lib.pageIcon looks like this:

lib.pageIcon = SVG
lib.pageIcon {
  renderMode = inline
  src = {item.icon.0}
  width = 100
  height = 100
}

but the rendering doesn’t work. If I use {item.icon.0} in <f:image image="{item.icon.0} it is working correctly. If I use <f:debug>{item}</item> I see the correct path under</p> <p>fileadmin{item.icon.0.originalFile.identifier}.</p> <p>I don’t know what to do to resolve the path correctly and thought maybe this is a bug. If not, excuse me for interupting you.<br />Regards,<br />Thorsten</p>"></f:image>

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.