Comments (11)
@nitech I'm gonna look into this issue as I also run a multi-sites with the plugin and haven't come the issue yet but currently in the process of a migration to CraftCMS v3.2, which the issue might be happening.
from oembed.
It might have something to do with multisite. My Craft install has 4 sites. When I changed the field type from oEmbed to Plain Text, this is what the plain text contained: {"url":{"url":{"url":{"url":"https://www.youtube.com/watch?v=RvvF1BQyUHs"}}}}
Seems to me that the json is wrapped inside itself four times. However, when I have a look at the content
table, I even find oEmbed fields wrapped 5 times in themselves.
from oembed.
When I manually fix the json-data in the database, this "wrapping" happens again immediately when I try to change propagation method on the said section.
I ended up changing oEmbed to a Plain Text field and fixing the data back to plain text by running the following SQLs
-- Detect wraps
SELECT field_videoUrl FROM customer_automasjon_craft.content
where field_videoUrl like '{\"url\":{\"url\"%';
-- Remove 2x (just run this as many times as you believe you have duplicates/wraps)
update content set field_videoUrl = replace(field_videoUrl, '{\"url\":{\"url\":', '{\"url\":')
where field_videoUrl like '{\"url\":{\"url\"%';
update content set field_videoUrl = replace(field_videoUrl, '}}', '}')
where field_videoUrl like '%}}';
-- Convert all oEmbeds to plain text
update content set field_videoUrl = replace(field_videoUrl, '{\"url\":\"', '')
where field_videoUrl like '{\"url\":%';
update content set field_videoUrl = replace(field_videoUrl, '\"}', '')
where field_videoUrl like '%}';
After I had converted the fields to plaintext and removed traces of the JSON-wrapping, the queued jobs went green.
So this is a fix to make due without the oEmbed-field while we wait for a fix to the bug.
from oembed.
@nitech I think this is an issue with the normalizeValue
in the field. I might need to support recursion here.
from oembed.
@nitech can you try checking out the feature/recursive-bug
branch in composer, using dev-feature/recursive-bug
tag, to see if thats fixing the 5th+ level JSON values from not being converted. That should prevent the issue and stop the queue job failing.
If not let me know and I'll keep on it for you.
from oembed.
Thanks @reganlawton . I will check it when I have the possibility. Right now I am deep into another problem that occurred when upgrading Craft CMS to 3.2 (neo-field duplicated content problem at spicywebau/craft-neo#242)
When I have that sorted out, I will test oEmbed at the mentioned branch.
You asked about an URL for the site - but I see you've removed the question from your comment. Just tell me if you need anything more.
In the meanwhile, while I work on the issue with the Neo-field - If it helps you, I can give you a copy of the database. Just give me an email and it'll be on it's way.
from oembed.
I missed the Link in the above messages so amended my question. The note that you had 5 level deep objects kinda stood out and was I issue I believed I’d patched but must never had pushed. It also explains the array to string issue.
So I’m hoping the recursive function being, well recursive, should resolve it. I also have additional work for CraftCMS 3.2 future version coming that’ll add Unit Testing to the plugin which should help cover these issues in the future.
from oembed.
@nitech Any luck testing this?
from oembed.
Deployed fix in v1.1.8
from oembed.
Sorry that I did not get to try it before you deployed. Great work Regan :-)
from oembed.
Did it resolve your error?
from oembed.
Related Issues (20)
- 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
- Field always renders as if it has content HOT 2
- Field causes template to crash if left blank HOT 3
- Issue when using oEmbed in Vizy block HOT 3
- v3 does not return `.images` and other API data HOT 10
- Additional data missing for media objects HOT 9
- How do we get the media data with the new update? HOT 7
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.