Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've followed the following steps (using the latest version of Drupal 8: 8.0.5):
- drush dl oembed
- drush en oembed -y
- drush cache-rebuild
This generates the error:
PHP Fatal error: Class 'Bangpound\\oEmbed\\Provider\\ProviderResolver' not found in /srv/drupal-clamav/htdocs/core/lib/Drupal/Component/DependencyInjection/Container.php on line 261
The site stops operating, there doesn't seem to be any way of running the site with this module enabled.
This is using the latest version of Drupal 8.0.5 and Oembed 8.x-1.x-dev.
In short, unless I'm missing something, the 8.x branch cannot be enabled without triggering a fatal error across the entire site.
Comments
Comment #2
ignat.volosky CreditAttribution: ignat.volosky commentedIt looks like composer doesn't load bangpound/oembed library correctly. I also had that error after installing module. When I tried to install library manually with composer, I got error: "The requested package bangpound/oembed ^0.0.0@dev exists as bangpound/oembed[dev-master, 0.0.x-dev] but these are rejected by your constraint.". I changed line in composer.json from "bangpound/oembed": "~0.0@dev" to "bangpound/oembed": "*" and module started to work as well.
Comment #3
dman CreditAttribution: dman as a volunteer and at Sparks Interactive commentedInstallation troubleshooting
Downloading via drush (traditionally) on a new Drupal8 site (8.3) *will not work* because you need the additional composer dependency. There is/was a drush plugin for composer manager that may help, but really
The only way to get new stuff (well, anything that includes further dependencies anyway) is going to be
composer require drupal/oembed:1.x-dev
However, today that was failing for me:
I've been running PHP7 on the CLI, and using a BLT Drupal Composer site setup, which comes with a lot of baggage. Baggage that includes some testing kit, and some constraints that may be the problem:
It seems I'd been running symfony/dom-crawler v3.2.8 on my new clean build, thanks to composer making some guesses for me.
I was able to DOWNGRADE the running version of symfony/dom-crawler to the point where bangpound/oembed was able to allow it.
...
So that got me somewhere functional successfully.
It looks like the desirable thing to to would be for bangpound/oembed to become upwardly compatible with the more recent symfony/dom-crawler version.
bangpound/oembed dev-master requires symfony/dom-crawler (~2.7)
Comment #4
dman CreditAttribution: dman as a volunteer and at Sparks Interactive commentedCalling on open issues for feedback #2884829: Offering to maintain the oEmbed module