-
Notifications
You must be signed in to change notification settings - Fork 37
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
Dealing defensively with rubbish field entries #10
Comments
@iparr I believe this is 100% valid. I’ll make it do errors only display in DEV via the twig variable output. In anything other I’ll just error to log file. |
I've tested this and it's allowed me check for valid oEmbeds in a much nicer way. Thanks! Great work. |
Thanks for the issue report and glad it’s working for you now. 👍 |
Hey, I think this has regressed or alternatively I've misunderstood something. I have invalid fields that I'd like to test for in Twig. I'm using:
or So how is best to test for valid fields on the front-end? |
I would like this re-opened if possible @reganlawton I'm still not sure how to test for embeds that are invalid. For example, when a URL like this How is best to combat this? |
I'll have to look into this I've been smashed lately when investor deadlines but have a few tweaks needing to be done to the application |
@iparr I have updated the handling a bit better if you want to take a look at this in the latest v1.3.9 |
Sorry, if I use it with the same example as above, I still get:
|
My content editors are wonderful, but I want to ensure that even if they put something dumb in the field that errors are handled as gracefully as possible.
I am using
{{ entry.field.render }}
and it works well (thanks!) but if an invalid value is added to the oEmbed field, then the whole template will error:Embed\Exceptions\InvalidUrlException
Is there a way I can handle this more gracefully? I'd like the page to render with the video simply missing.
The text was updated successfully, but these errors were encountered: