Skip to content
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

Updating to Embed 4 #152

Closed
ttempleton opened this issue Nov 9, 2020 · 10 comments
Closed

Updating to Embed 4 #152

ttempleton opened this issue Nov 9, 2020 · 10 comments
Milestone

Comments

@ttempleton
Copy link
Contributor

ttempleton commented Nov 9, 2020

Currently, Embedded Assets uses Embed 3, due to Craft 3's minimum requirement of PHP 7.0 7.2.5 (as of Craft 3.6), and Embed 4's minimum requirement of PHP 7.4. Craft 4 will be updating the minimum PHP requirement to 7.4, though, so we'll be able to update Embed for the Craft 4 version.

@ttempleton ttempleton added this to the 3.0.0 milestone Nov 9, 2020
@toyflish
Copy link

@ttempleton is there a feature branch that implements Embed 4 that can be dropped in as a fix for Youtube-consent-banner for people that are on php7.4?

@ttempleton
Copy link
Contributor Author

Working on this in the enhancement/embed-4 branch. It's fairly basic at the moment, and most plugin settings and the BeforeCreateAdapterEvent's dispatcherConfig property aren't being used yet (hopefully we'll be able to keep most of them, but some may need to be removed).

Some embedded asset properties from Embed 3 aren't provided by Embed 4, so they won't be available for newly-saved embedded assets (though existing embedded assets with these properties will continue to work). These are:

  • type
  • tags
  • images
  • imageWidth
  • imageHeight
  • providerIcons

@arifje
Copy link
Contributor

arifje commented Dec 1, 2023

Any news on this one? :-)

@ttempleton
Copy link
Contributor Author

I'd like to start off this comment by acknowledging that it's been a long time since I opened this issue, that this should have been completed a while ago, and I do apologise for that.

Work stalled on this due to some functionality from Embed 3 that was not included in Embed 4 at the time I was actively working on it. I'm unsure if all of that functionality is still missing, but I've had plans to revisit that and figure out what needs to be done e.g. either working on pull requests or forking the Embed project for the functionality we need. I'm unlikely to have time in the next week or two to work on it, but I definitely want to finish it sooner rather than later, and in particular, finish it before we need to start work on upgrades for Craft 5.

@benfeather
Copy link

Do you happen to have any updates on this?
Unfortunately, using Embed v3 causes a dependency error with another plugin I'm using that requires Embed v4.

@scandella
Copy link
Contributor

Same situation.
Please let us know if the upgrade is not possible so we can move on to another solution.

@ttempleton
Copy link
Contributor Author

I have just released Embedded Assets 4.0.0-beta.1, for Craft 4 (4.7.0 or later), using Embed 4.

I want to firstly point out that this has been released as a beta because I am not currently able to test some plugin settings (e.g. embed.ly/iframely keys) and therefore cannot confirm that they work; and I am also pretty sure that the Google API key setting does not currently work, due to Embed 4 not supporting rich Google embeds as far as I can tell (or, if it does, I have overlooked how to do it). I may need to work on a Google Maps extractor at some point in the future.

It would be very much appreciated if anyone is willing to try out the release and let me know of any issues. If you choose to try it, you should familiarise yourself with the changes in this release, and the properties of BeforeRequestEvent if you were previously using BeforeCreateAdapterEvent. I have tried to make as many Embed 4 settings available to that event as possible; if I have missed anything, please let me know, and I will add it.

I will close this issue now, but if you have any questions about the new release, please let me know here, and if you find a bug, please open a new issue.

@ttempleton
Copy link
Contributor Author

I've also just released 5.0.0-beta.1, for Craft 5, with the same usage of Embed 4, and the same caveats as mentioned above with certain plugin settings that I am unable to test.

@benfeather
Copy link

I've been using the plugin on both a v4 and a demo v5 site for YouTube videos, and it's working well so far.
Thank you for updating your plugin, it's an invaluable addition to Craft CMS!

@arifje
Copy link
Contributor

arifje commented Apr 11, 2024

Twitter/X embeds don't seem work after updating;

#17 {main} {"memory":6936968,"exception":"[object] (Embed\\Http\\NetworkException(code: 47): Maximum (10) redirects followed at /var/www/xxx/cms/vendor/embed/embed/src/Http/CurlDispatcher.php:165)"} 
2024-04-11 15:17:36 [web.INFO] [application] Request context:
$_GET = [
		'p' => 'admin/actions/embeddedassets/actions/preview'
		'showContent' => '1'
		'callback' => 'embeddedassetsbt9f8g5ocde7'
		'url' => 'https://twitter.com/Rhevolver/status/1778271017699291366'
]

Found a related issue; oscarotero/Embed#531

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants