No Backend Icons FLUID Powered TYPO3 - wrong path?

空扰寡人 提交于 2020-01-03 05:06:07

问题


after my first steps with FLUID POWERED TYPO3.

The latest versions flux 7.1.2, fluidpages 3.1.2, fluidcontent 4.1.1, fluidcontent_core 1.0.2, vhs 2.1.4

I've got only a small issue ... I don't see my Icons for FLUIDPAGES or FLUX CONTENT ELEMENTS at TYPO3 Backend.

This is the Icon Path for Fluidpages-Images from Screenshot:

typo3conf/ext/mvz_neuhann/Resources/Public/Icons/Page/Standard.gif

I try it with or without baseURL nothing happens. The Icon is visible, when I paste the path into my Browser:

But my JS-Console says:
http://mvz.local/typo3/typo3conf/ext/mvz_neuhann/Resources/Public/Icons/Page/Standard.gif 404 (Not Found)

Because of the 'typo3/' after my URL. But why? I'm on a local Server, no File Permissons or sth., Clear Cache, delete typo3temp.

Nothing. I can't see my Icons from my provider Extension via fluidpages or flux. It's the same with my FLUX Icons, the Standard-Icon is availible but how is the path at my flux form?

I've tried:

<flux:form id="home05" options="{group: 'xy', icon: '{f:uri.resource(path: \'Public/Icons/Content/myicon.gif\')}'}">
// or
<flux:form id="home05" options="{icon: 'typo3conf/ext/my_extension/Resources/Public/Icons/Content/myicon.gif', group: 'xy'}">
//
<flux:form id="home05" options="{icon: 'EXT:my_extension/Resources/Public/Icons/Content/myicon.gif', group: 'xy'}">

回答1:


While in the backend, Flux creates a relative path to your Icon. To be precise, it creates a relative path to PATH_site constant. This means in your iframe, the path is plain wrong. This is a common issue with backend images. There's a few ways to solve this:

  1. Create a custom, absolute uri with f:uri.resource and f:uri.image (absolute paths)

    • Example with proper escaping would be

    <flux:form id="fluidpage" options="{icon: '{f:uri.resource(path: \'Icons/Content/myImage.gif\')}'}">

  2. prefix your path with a slash if it's a custom Icon so the path will start at your root
  3. There should also be automatic icon discovery which will find an icon Resources/Public/Icons/Standard.(png|gif) for your page Template Standard.html

If you have further issues, please refer to our bugtracker on GitHub.



来源:https://stackoverflow.com/questions/28601412/no-backend-icons-fluid-powered-typo3-wrong-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!