-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
HTML viewhelper should allow CSS files from other extension's Private folder #247
Comments
@liayn Thank you very much for that detailed bug report and providing a fix! I'll need to have a closer look at this use case and the failing test, but probably the solution will be to adjust the test logic. I can take care of this, let me know in case you'd need a quick fix. |
The use case is rather simple: Nothing should be public that does not need to be public. In case of CSS for a PDF: No need to go public. (Actually this is basically the same for every local resource used when rendering PDF.) |
Yes, I totally agree with the benefits of this! I was more concerned with the failing test, because with this change we do not throw a if (!is_file($styleSheetFile)) {
throw new ValidationException('Provided styleSheet file path "' . $styleSheetFile . '" does not exist. ERROR: 1729546062', 1729546062, $e);
} What do you think? |
We should probably use |
Describe the bug
It is not possible to use CSS files for HTMLViewHelper, which are located in a
Resources/Private
folder of an extension.Environment
TYPO3 version(s): v12+
pdfviewhelpers version: v3.0.0
Steps to reproduce
Configure in TypoScript:
styleSheet = EXT:myext/Resources/Private/some/path/styles.css
Expected behavior
The stylesheet is loaded.
Possible solution
Adjust the code part in https://github.com/bithost-gmbh/pdfviewhelpers/blob/main/Classes/ViewHelpers/HtmlViewHelper.php#L97 to:
If the CSS file can't be found via FAL, try directly loading it.
The text was updated successfully, but these errors were encountered: