Forum
Vimeo Field Type Error
New to Perch, and encountering a problem when adding a URL to a Vimeo field and trying to save the region.
PHP error is:
Fatal error: Class 'Michelf\SmartyPants' not found in /srv/users/.../perch/core/lib/PerchFieldTypes.class.php on line 482
Smarty Pants class is present, so I'm not sure what's causing the error, and I'm having trouble locating documentation for this add-on.
Just to confirm I'm using Perch 2.6.6, and the region will save fine if the Vimeo field is left empty.
That's surprising. Obviously the Vimeo field type has nothing to do with SmartyPants.
Do you have any markdown text areas in the template?
Yes, I had a textarea before the new Vimeo field with markdown enabled.
When I set markdown to 'false' in this text area, the Vimeo field now works (saves) correctly without errors.
But strangely when I previously left the Vimeo field empty the markdown-enabled text area saved fine.
Truth is I don't think the client will use markdown, so it's not a big issue. Thanks for your help Drew.
You shouldn't be getting that error whatever. Are you running any out of date apps?
I don't think so, the site is only recently installed. I have Perch Twitter 3.2, Redactor I installed a few days ago. Vimeo and Gallery I only installed today.
I thought maybe it was just my inexperience in setting up the perch:content fields with the correct combination of options for markdown, html, editor etc. For instance I had Redactor as my editor, and html and markdown both set to true. Since then I've made the adjustment as follows:
<perch:content id="body" type="textarea" label="Body" markdown="false" editor="redactor" html="true" required="true" />
and it's all working (including the Vimeo field) fine now.
If you'd like me to send any more information though, I'll be happy to do so.
What sort of template are you using this with?
Hi Drew, it's a custom template within '/content' based on text_block.html, but extended with a video field. It looks like this: