Problem/Motivation
Encountered warning when trying to access the schema_metatag configuration
Steps to reproduce
- Install the schema_metatag and its sub-modules
- Navigate to "/admin/config/search/metatag/global" and notice the following errors:
Warning: Illegal offset type in Drupal\schema_metatag\SchemaMetatagClient->objectInfo() (line 122 of modules/contrib/schema_metatag/src/SchemaMetatagClient.php).
Drupal\schema_metatag\SchemaMetatagClient->objectInfo() (Line: 188)
Drupal\schema_metatag\SchemaMetatagClient->getObjectTree(, ) (Line: 224)
Drupal\schema_metatag\SchemaMetatagClient->getTree('Article', -1) (Line: 347)
Drupal\schema_metatag\SchemaMetatagClient->getOptionList('Article', -1) (Line: 162)
Drupal\schema_metatag\Plugin\schema_metatag\PropertyTypeBase->getOptionList(Array, -1) (Line: 28)
Drupal\schema_metatag\Plugin\schema_metatag\PropertyType\Type->formElement(Array) (Line: 234)
Drupal\schema_metatag\Plugin\schema_metatag\PropertyTypeBase->form(Array) (Line: 119)
Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase->form(Array) (Line: 284)
Drupal\metatag\MetatagManager->form(Array, Array) (Line: 97)
Drupal\metatag\Form\MetatagDefaultsForm->form(Array, Object) (Line: 149)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 532)
Drupal\Core\Form\FormBuilder->retrieveForm('metatag_defaults_edit_form', Object) (Line: 278)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 97)
Drupal\autosave_form\Form\AutosaveFormBuilder->buildForm(Object, Object) (Line: 91)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 67)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
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: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | schema_metatag-3187204-3.patch | 712 bytes | ankit agrawal |
Comments
Comment #2
ankit agrawal commentedComment #3
ankit agrawal commentedCreated a patch for fixing this issue:
Comment #4
ankit agrawal commentedComment #5
ankit agrawal commentedComment #6
alanhdev commentedThis is a duplicate of https://www.drupal.org/project/schema_metatag/issues/3174103 which has been fixed.