Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to render image tag #622

Closed
HansDump opened this issue Feb 28, 2024 · 7 comments
Closed

Unable to render image tag #622

HansDump opened this issue Feb 28, 2024 · 7 comments

Comments

@HansDump
Copy link

Hi there,
when I try to open the BE module an error occurs:
_Unable to render image tag: File /blubb/public/assets/a19a52d18aa5fcd2da308163624eb166/Icons/Extension.svg does not exist.
My typo url looks like this: https://devserver.com/blubb/public

When I debugged the image rendering Viewhelper which tries to render f.e. the following
{f:uri.image(src: 'EXT:mask/Resources/Public/Icons/MaskUkraine.svg')}
the asset handling isn't matching the correct path because of the relative path of my installation.
So it seems it tries to resolves the following: https://devserver.com/blubb/public/blubb/public/_assets/a19a52d18aa5fcd2da308163624eb166/Icons/Extension.svg

However, if you replace f.e.
{f:uri.image(src: 'EXT:mask/Resources/Public/Icons/MaskUkraine.svg')}
with
{f:uri.resource(extensionName: 'Mask', path: 'Icons/MaskUkraine.svg')}
and the replace f:image with
(https://docs.typo3.org/other/typo3/view-helper-reference/12.4/en-us/typo3/fluid/latest/Uri/Resource.html)
it would work. And not just for me.

@nhovratov
Copy link
Collaborator

Your suggestion seems correct, will change it to f:uri.resource as the image should not be processed anyway.

@HansDump
Copy link
Author

Thank you :)

nhovratov added a commit that referenced this issue Feb 29, 2024
@HansDump
Copy link
Author

Hey,
sorry but it's me again :)
I installed your master with the changes, cool, thank you.
But now there is another issue which occurs when I open your module:
In your AjaxController in line 347 the retrieveFileOrFolderObject-Function (which is the same function the ImageViewhelper uses) is used to render the Backend Layout Icons. So for me the same error shows up as above.

@nhovratov
Copy link
Collaborator

How exactly did you setup TYPO3? It's not really clear for me what you mean by: https://devserver.com/blubb/public

@HansDump
Copy link
Author

I have a dev server in which I install various typo3 installations. "blubb" is an example of a project name. Same scenario if you use xampp for example (but in my case it's a linux). However, if there is a relative path used in the backend context it isn't working.

@nhovratov
Copy link
Collaborator

Ah ok. This could also be a real TYPO3 bug. Normally f:image should be aware of this just as f:uri.resource.

@HansDump
Copy link
Author

I think so too :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants