- 🇷🇴Romania claudiu.cristea Arad 🇷🇴
Isn't this a configuration issue? Please provide a patch for evaluation.
As long as I have role_toggle installed I cannot add (/admin/structure/legal/add) a Legal document or edit an exisiting one.
The following error occurs:
The website encountered an unexpected error. Please try again later.
TypeError: Drupal\entity_legal\Form\EntityLegalDocumentForm::__construct(): Argument #3 ($currentUser) must be of type Drupal\Core\Session\AccountProxy, Drupal\role_toggle\RoleToggleCurrentUser given, called in /www/htdocs/…/mydomain.org/dev/web/modules/contrib/entity_legal/src/Form/EntityLegalDocumentForm.php on line 83 in Drupal\entity_legal\Form\EntityLegalDocumentForm->__construct() (line 67 of modules/contrib/entity_legal/src/Form/EntityLegalDocumentForm.php).
Drupal\entity_legal\Form\EntityLegalDocumentForm->__construct(Object, Object, Object, Object) (Line: 83)
Drupal\entity_legal\Form\EntityLegalDocumentForm::create(Object) (Line: 28)
Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('Drupal\entity_legal\Form\EntityLegalDocumentForm') (Line: 210)
Drupal\Core\Entity\EntityTypeManager->getFormObject('entity_legal_document', 'add') (Line: 69)
Drupal\Core\Entity\HtmlEntityFormController->getFormObject(Object, 'entity_legal_document.add.default') (Line: 58)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
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: 159)
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: 709)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Maybe this issue has to be moved to role_toggle. I don't know.
Needs work
4.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Isn't this a configuration issue? Please provide a patch for evaluation.