Score:-3

Why do I get this exception?

mu flag

I'm getting this error constantly and I can't quite figure out what's wrong.

TypeError: strpos(): Argument #1 ($haystack) must be of type string, array given in strpos() (line 126 of core/lib/Drupal/Core/Extension/Dependency.php).
strpos(Array, ':') (Line: 126)
Drupal\Core\Extension\Dependency::createFromString(Array) (Line: 228)
Drupal\Core\Extension\ModuleHandler->buildModuleDependencies(Array) (Line: 169)
Drupal\Core\Extension\ModuleExtensionList->doList() (Line: 282)
Drupal\Core\Extension\ExtensionList->getList() (Line: 143)
Drupal\update\UpdateManager->getProjects() (Line: 283)
update_get_available() (Line: 38)
update_requirements('runtime') (Line: 96)
update_page_top(Array) (Line: 356)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent{closure}(Object, 'update') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('page_top', Object) (Line: 357)
Drupal\Core\Render\MainContent\HtmlRenderer->buildPageTopAndBottom(Array) (Line: 150)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Score:1
cn flag

This error is caused by an incorrect *.info.yml file.

A correct example would be:

media.info.yml

name: Media
description: 'Manages the creation, configuration, and display of media items.'
type: module
package: Core
version: VERSION
dependencies:
  - drupal:file
  - drupal:image
  - drupal:user
configure: media.settings

Where you can see that in dependencies each value is a string. You have installed a module where the *.info.yml file contains a subarray instead.

acey avatar
mu flag
Thank you for your reply! I followed this but am now presented with a new error Error message Warning: filemtime(): stat failed for sites/default/files/php/twig/64b0f0e5da6a4_block--local-actions-bloc_ehGUpffeW4WztV4yt3YIIFTYB/rdxaXvhzA2APVyhQiNk7E9DqdFVi_RFtckjlJqdY0M0.php in Drupal\Component\PhpStorage\MTimeProtectedFileStorage->checkFile() (line 63 of core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php).
4uk4 avatar
cn flag
It's only a warning, Can you remove it by clearing the cache? If not, ask a new question and add more details about when this is happening and what you have tried so far.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.