Problem/Motivation
Feeds not working on Drupal 10.1.6
Environment: VM with 2 CPU, 8Mb RAM, running Ubuntu 22.04.3 LTS server, Apache 2.4.52, PHP 8.2.13, MySQL 8.0.35
Steps to reproduce
Installed a fresh, empty copy of Drupal 10.1.6 on a local, virtual machine
Installed Feeds 8.x-3.0-beta4
Go to Structure > Feed types > Add feed type
Get the following error:
The website encountered an unexpected error. Please try again later.
Error: Interface "Laminas\Feed\Reader\ExtensionManagerInterface" not found in include() (line 13 of modules/feeds/src/Component/ZfExtensionManagerSfContainer.php).
Composer\Autoload\includeFile() (Line: 428)
Composer\Autoload\ClassLoader->loadClass() (Line: 259)
Drupal\Component\DependencyInjection\Container->createService() (Line: 177)
Drupal\Component\DependencyInjection\Container->get() (Line: 61)
Drupal\feeds\Feeds\Parser\SyndicationParser::create() (Line: 21)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance() (Line: 22)
Drupal\feeds\Plugin\Type\FeedsAnnotationFactory->createInstance() (Line: 83)
Drupal\Component\Plugin\PluginManagerBase->createInstance() (Line: 62)
Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->initializePlugin() (Line: 80)
Drupal\Component\Plugin\LazyPluginCollection->get() (Line: 83)
Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->setConfiguration() (Line: 47)
Drupal\feeds\Feeds\FeedsSingleLazyPluginCollection->setConfiguration() (Line: 99)
Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->addInstanceId() (Line: 55)
Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->__construct() (Line: 38)
Drupal\feeds\Feeds\FeedsSingleLazyPluginCollection->__construct() (Line: 566)
Drupal\feeds\Entity\FeedType->getPluginCollections() (Line: 482)
Drupal\feeds\Entity\FeedType->getPlugin() (Line: 445)
Drupal\feeds\Entity\FeedType->getPlugins() (Line: 195)
Drupal\feeds\FeedTypeForm->form() (Line: 107)
Drupal\Core\Entity\EntityForm->buildForm()
call_user_func_array() (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 283)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 592)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)
Issue fork feeds-3405607
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
megachrizThe Feeds RSS parser depends on an external library called "laminas/laminas-feed". Do you manage the installation of modules with Composer? If not, you'll need the Ludwig module in order to install the necessary dependency.
In case of the latter, I would still call this a bug. Instead of displaying an error like this, Feeds should inform you about a missing library and provide instructions on how to install it.
Comment #5
megachrizI implemented
feeds_requirements()to make Feeds check if the library "laminas/laminas-feed" is installed upon the installation of Feeds. If the library is not there, Feeds cannot be installed now.If you now try to install Feeds without the library, you will get the following error:
If you have the Ludwig module already installed, but somehow the library is still not present, the error message is this instead:
And "Packages list" links to /admin/reports/packages.
I'll consult @devad (maintainer of the Ludwig module) if this instruction is correct. I did try to install the Ludwig module first and then Feeds afterwards and the library was still missing. But when I went to /admin/reports/packages, the library got downloaded and installed. And then I was able to install Feeds successfully.
Comment #6
devad commentedYes. This is all correct Ludwig instructions. Thanks.
Comment #8
megachrizI've merged the code. Thanks for responding so quickly, @devad!