Message of the day:
SS4.3.1 security release is out - https://www.silverstripe.org/blog/high-severity-security-issue-cve-2019-5715/
SilverStripe 4 related information and questions.
As described here: https://forum.silverstripe.org/t/adding-svg-to-the-allowed-files-in-ss4/883
Hide attachment content
This one comes up quite a lot on the Slack channel, so I thought it was worth a post here as well. The below is specific to SVG files, but the same techniques apply to other extensions. The first thing to note is that, contrary to what your instinct might think, an SVG isn’t an image file. In SilverStripe, images are bitmap-style files such as jpg, gif, png, etc. and when you use them, you get all kinds of extra manipulation classes. Because of this, SVG files needs to be stored in File ...
Hmmm, how can I add a file type to the allowed filetypes .htaccess in assets?
I have a form with a CheckboxSetField that I need to be ticked before submission, so I've added it to RequiredFields. But no matter what I do, it always seems to fail the validator. Any ideas what I'm doing wrong?
- $myForm = Form::create(
- $fields = FieldList::create([
- CheckboxField::create('ConsentObtained', $consentObtainedLabel)
- $actions = FieldList::create([...]),
- $validator = RequiredFields::create([
($consentObtainedLabel is a string loaded from the CMS)
Strangely enough, error message shown it isn't
'ConsentObtained' is required. It's
'The value of my CMS string' is required
heh, if I pass $consentObtainedLabel into the RequiredFields constructor instead, it does pass. lol
Found it... was in my template override to http://CheckboxField.ss ... the value was hardcoded to 0 😄
Hrm... no, still not it! It seems RequiredFields is not seeing data for the ConsentObtained field
For some reason, emails from the CMS always look in the application folder, maybe that's the problem?
Hello, having a bit of an issue with the userforms module. I'm trying to use a custom email template and have added the code:
into my config.yml file. The template shows up correctly in the email template drop down but when the email is sent it defaults back to the original template.
- email_template_directory: app/templates/custom_userforms_emails
I'm getting the error:
and the directory I have the templates in is:
- None of the following templates could be found: tes/custom_userforms_emails/Test in themes
for some reason it is cut off in the error.
I've tried dev/build and flushing multiple times, also tried removing the thememanifest cache (was mentioned on a previous bug post on github) but nothing has worked for me.
Has anyone had anything similar? Cheers!
@Ryan Duncan has joined the channel
If I have an
Image object, is there a way to get access to the Interventation library methods through it?
only I need to do some things based on the get param
so actually my bad, it can redirect to where it is going now