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

[TASK] get icon with PathUtility instead of ResourceFactory #653

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

jakowidhalm
Copy link
Contributor

Closes #652

@jakowidhalm jakowidhalm changed the title [TASk] get icon with PathUtility instead of ResourceFactory [TASK] get icon with PathUtility instead of ResourceFactory Nov 22, 2024
@nhovratov nhovratov merged commit c45a82d into Gernott:main Nov 22, 2024
5 checks passed
@nhovratov
Copy link
Collaborator

@jakowidhalm Thank you very much for the PR!

@ghost
Copy link

ghost commented Jan 27, 2025

Unfortunately, this PR prevents storing content element preview Icons outside typo3conf/ext/ for example in fileadmin/mask-icons/. The error causes the mask backend module load blank and also breaks the "page" module when clicking a page on page tree. Downgrading mask to 8.3.11 makes everything work again and preview Icons are displayed too.

Stacktrace:

Array
(
    [mode] => WEB
    [application_mode] => BE
    [exception_class] => TYPO3\CMS\Core\Resource\Exception\InvalidFileException
    [exception_code] => 1630089406
    [file] => /www/typo3shared/typo3_src-12.4.14/typo3/sysext/core/Classes/Utility/PathUtility.php
    [line] => 100
    [message] => Resource paths must start with "EXT:"
    [request_url] => https://www.example.org/typo3/ajax/mask/elements?token=--AnonymizedToken--
    [exception] => TYPO3\CMS\Core\Resource\Exception\InvalidFileException: Resource paths must start with "EXT:" in /www/typo3shared/typo3_src-12.4.14/typo3/sysext/core/Classes/Utility/PathUtility.php:100
Stack trace:
#0 /www/website/html/typo3conf/ext/mask/Classes/Imaging/PreviewIconResolver.php(58): TYPO3\CMS\Core\Utility\PathUtility::getPublicResourceWebPath()
#1 /www/website/html/typo3conf/ext/mask/Classes/Imaging/PreviewIconResolver.php(41): MASK\Mask\Imaging\PreviewIconResolver->getPreviewIconPath()
#2 /www/website/html/typo3conf/ext/mask/Classes/Imaging/IconProvider/ContentElementIconProvider.php(48): MASK\Mask\Imaging\PreviewIconResolver->isPreviewIconAvailable()
#3 /www/website/html/typo3conf/ext/mask/Classes/Imaging/IconProvider/ContentElementIconProvider.php(39): MASK\Mask\Imaging\IconProvider\ContentElementIconProvider->generateMarkup()
#4 /www/typo3shared/typo3_src-12.4.14/typo3/sysext/core/Classes/Imaging/IconFactory.php(108): MASK\Mask\Imaging\IconProvider\ContentElementIconProvider->prepareIconMarkup()
#5 /www/website/html/typo3conf/ext/mask/Classes/Controller/AjaxController.php(389): TYPO3\CMS\Core\Imaging\IconFactory->getIcon()
#6 /www/typo3shared/typo3_src-12.4.14/typo3/sysext/backend/Classes/Http/RouteDispatcher.php(77): MASK\Mask\Controller\AjaxController->elements()
[...]

@nhovratov
Copy link
Collaborator

@TheOnlyMarkus All Mask resources must be inside an extension since a long time ago. The fact that it worked before was more of a bug than a feature. Please migrate your icons to a Resources/Public folder inside your extension.

This is the case since Mask v8: https://docs.typo3.org/p/mask/mask/9.0/en-us/ChangeLog/8.0/Index.html#breaking-changes

@ghost
Copy link

ghost commented Jan 29, 2025

Sorry, but this is unfeasonable. Most people aren't programmers and don't know how to create a extension. Please revert this PR. It worked for a very long time until November 2024.

@nhovratov
Copy link
Collaborator

You don't need to be a programmer to create an extension. This is basic integrator knowledge.

@ghost
Copy link

ghost commented Jan 29, 2025

Sorry, you are wrong. But I understand you won't make that change and that's a shame because upgrading to next major version is now a hassle which proves once again that its not worth reporting errors to open source projects but instead just move on.

@nhovratov
Copy link
Collaborator

I don't like the tone at all. Disliking every comment won't help you. If you are not able to discuss technical topics in an appropriate manner, then this is a you problem. The fact that you are able to use this extesion in TYPO3 v12/v13 for free(!) is thanks to my time and passion that went into the development. Mask has one of the smoothest upgrade paths thanks to dozens of backwards compatibility code paths. Simply refusing to move some files somewhere else and calling it a "hassle" is preposterous.

@butu
Copy link
Collaborator

butu commented Jan 29, 2025

Why so disrespectful? @nhovratov pointed you to the documentation where this change is listed and helped you find the error. You just have to move the Icons into an Extension. How is this a hassle?

@ghost
Copy link

ghost commented Jan 29, 2025

My comments got also disliked prior to me disliking yours. If you read my comments as disrespectful that that's something you have to deal with yourself. I am a very friendly person. As I said, I don't care anymore now. I am moving on to a different Extension. Mask is not worth my time if the configuration of paths is now limited to some opinionated locations by the developers.

@ghost
Copy link

ghost commented Jan 29, 2025

And only for the record, my company did invest in mask in the past.

@nhovratov
Copy link
Collaborator

wtf

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

Successfully merging this pull request may close these issues.

Preview-Icons are stored in the sys_file table
3 participants