Comments (9)
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
from oembed.
@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.
from oembed.
@iparr I've finally got a chances to push changes to the plugin I made this morning tagged v1.1.3.
It comes with better sub prop handling, if the property is missing, as well as a new valid
methods as a TWIG variable and new method on the field. See README for more information.
from oembed.
I've tested this and it's allowed me check for valid oEmbeds in a much nicer way. Thanks! Great work.
from oembed.
Thanks for the issue report and glad it’s working for you now.
from oembed.
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:
{% block.embed.valid %}
…
or {{ block.embedId.valid }}
or {% if craft.oembed.valid(block.embedId.valid) %}…
and both still result in errors.
So how is best to test for valid fields on the front-end?
from oembed.
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 https://thesludgelord.bandcamp.com/album/metal
is rendered invalid because an owner removes it, then my website breaks with a Caused by: Embed\Exceptions\InvalidUrlException
error.
How is best to combat this?
from oembed.
@iparr I have updated the handling a bit better if you want to take a look at this in the latest v1.3.9
from oembed.
Sorry, if I use it with the same example as above, I still get:
Serialization of 'class@anonymous' is not allowed
↵
Caused by: Embed\Exceptions\InvalidUrlException
Invalid url 'https://thesludgelord.bandcamp.com/album/metal' (Status code 404)
from oembed.
Related Issues (20)
- Required field isn't verified on entry save HOT 7
- Craft 4? HOT 13
- 2.0.0 breaks under Craft 3.7.44 and PHP 7.4.3 HOT 4
- Enabling the cache breaks the plugin under PHP 8.1+ HOT 7
- Serialization of 'DOMDocument' is not allowed HOT 14
- FallbackAdapter is not handled correctly due to #101 fix HOT 5
- Loss of metadata when loading from cache on 2.2.x HOT 2
- Youtube embed stopped working HOT 7
- Error when using entry.field.media.image HOT 15
- oEmbed Stopped Pulling Data HOT 5
- Broken URL notifications not working on Craft 4 HOT 3
- Craft 4 embeds suddenly default to 200px wide iframe HOT 10
- Spotify embeds are only working in local environment HOT 1
- "Please check your URL" bug is back? HOT 20
- Cache tweets HOT 2
- Further changes required for GDPR compliance HOT 4
- Video preview very small HOT 2
- Division by zero error in both backend and frontend HOT 4
- ignores time #t=1m12s HOT 4
- Vimeo URLs not working (when video is set to be hidden on Vimeo.com) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oembed.