-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
HTMLPurifier should have its cache directory replaced #264
Comments
Didn't even realise it did this! Should be fixed in 1.3.4 |
@engram-design Thanks for hopping on this so quick, we'll test it on our end and let you know if there are any issues 👍 |
@engram-design It looks like there's a new issue now: We have a Global Formie Form Select field, that allows us to assign a formie form into the Footer of our project. When I save that field that's when the error above appears. The weird thing is that we're not using a ST field there, it's a standalone Formie FieldType. |
@DynamiteGoesBoom Strange. Are you able to send through the entire stack trace, or better, the content of web.log so I can see the trace of where this is coming from? |
@engram-design ask and you shall receive:
|
@DynamiteGoesBoom Can you confirm your Craft version as well? |
@engram-design Sure thing: |
Looks like it's this issue - verbb/super-table#397 - unrelated to Formie and to do with Craft 3.5.17 |
@engram-design Hmm could be, but weird that we're not using a ST for that field and weird that another plugin would cause this. Gotta love web development #devLyfe :) |
@DynamiteGoesBoom Does the global set contain a Super Table field though? |
@engram-design Ahh yes it does. We have a |
@DynamiteGoesBoom Should be fixed in Super Table 2.6.5 |
@engram-design Thanks again and looks like we're all squared away! |
Description
HTMLPurifier tries to use the vendor folder as a cache directory. This is bad for several reasons, some of which are discussed here: ezyang/htmlpurifier#71 . My specific issue is that Servd has non-writable vendor folders (security 💪) so HTMLPurifier gets all upset with the following error:
🤣
As a result they added a method to overwrite the cache dir.
Yii2 uses HTMLPurifier under the hood and they hit the same issue and ensured it was using a custom cache dir during its setup:
https://github.com/yiisoft/yii2/blob/da447fd1bb9778b8b76994f3e3e14f9748c67625/framework/helpers/BaseHtmlPurifier.php#L47
I'd recommend applying a similar config overwrite to the instantiation of HTMLPurifier in formie too if poss, maybe using the craft cache folder instead:
formie/src/fields/formfields/Html.php
Line 59 in ad5aafb
Steps to reproduce
Cheers
The text was updated successfully, but these errors were encountered: