Whenever I attempt to view, edit or delete a contributor or unite a contributor with another one I get the following error:

The website encountered an unexpected error. Please try again later.

The same error occurs when I want to create a contributor, though the contributor is created anyway. The orrur doesn't occur when I indirectly create a contributor while creating a publication. Whenever the error occurs I get the following protocol message:

Error: Call to undefined method Drupal\Core\Field\BaseFieldDefinition::getFieldDefinition() in Drupal\Core\Field\FieldItemBase->getFieldDefinition() (Zeile 75 in /var/www/html/druco/web/core/lib/Drupal/Core/Field/FieldItemBase.php) #0 /var/www/html/druco/web/modules/stacks/inc/theme.inc(130): Drupal\Core\Field\FieldItemBase->getFieldDefinition() #1 [internal function]: stacks_theme_suggestions_page(Array) #2 /var/www/html/druco/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(403): call_user_func_array('stacks_theme_su...', Array) #3 /var/www/html/druco/web/core/lib/Drupal/Core/Theme/ThemeManager.php(230): Drupal\Core\Extension\ModuleHandler->invokeAll('theme_suggestio...', Array) #4 /var/www/html/druco/web/core/lib/Drupal/Core/Render/Renderer.php(437): Drupal\Core\Theme\ThemeManager->render('page', Array) #5 /var/www/html/druco/web/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #6 /var/www/html/druco/web/core/lib/Drupal/Core/Template/TwigExtension.php(490): Drupal\Core\Render\Renderer->render(Array) #7 /var/www/html/druco/vendor/twig/twig/lib/Twig/Environment.php(467) : eval()'d code(90): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) #8 /var/www/html/druco/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_be8c7bbb9c824f2826368d7c8da984c6279779db72a67fd8056a00bb23b816f2->doDisplay(Array, Array) #9 /var/www/html/druco/vendor/twig/twig/lib/Twig/Template.php(403): Twig_Template->displayWithErrorHandling(Array, Array) #10 /var/www/html/druco/vendor/twig/twig/lib/Twig/Template.php(411): Twig_Template->display(Array) #11 /var/www/html/druco/web/core/themes/engines/twig/twig.engine(64): Twig_Template->render(Array) #12 /var/www/html/druco/web/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('core/themes/cla...', Array) #13 /var/www/html/druco/web/core/lib/Drupal/Core/Render/Renderer.php(437): Drupal\Core\Theme\ThemeManager->render('html', Array) #14 /var/www/html/druco/web/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #15 /var/www/html/druco/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(147): Drupal\Core\Render\Renderer->render(Array) #16 /var/www/html/druco/web/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() #17 /var/www/html/druco/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(148): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #18 /var/www/html/druco/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) #19 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #20 /var/www/html/druco/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #21 /var/www/html/druco/vendor/symfony/http-kernel/HttpKernel.php(156): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent)) #22 /var/www/html/druco/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #23 /var/www/html/druco/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /var/www/html/druco/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /var/www/html/druco/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /var/www/html/druco/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #27 /var/www/html/druco/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #28 /var/www/html/druco/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #29 /var/www/html/druco/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #30 /var/www/html/druco/web/core/lib/Drupal/Core/DrupalKernel.php(665): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #31 /var/www/html/druco/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #32 {main}.

Hope you can help!

Best regards
Lennart

Comments

lbundt created an issue. See original summary.

antongp’s picture

Hi. As I can see, the problem is in Stacks module (stacks/inc/theme.inc file, line 130).

antongp’s picture

Title: Unexpected errors when Contributors are involved » When used with the Stacks module, there are errors when Contributors are viewed, edited, etc.
Assigned: lbundt » antongp

Did more research: there is actually a possibility that the problem is in the Bibliography & Citation - Entity module. Stay tuned for updates.

  • antongp committed 813ece1 on 8.x-1.x
    Issue #3003787 by lbundt: When used with the Stacks module, there are...
antongp’s picture

Version: 8.x-1.0-alpha7 » 8.x-1.x-dev
Status: Active » Fixed

\Drupal\bibcite_entity\ContributorName extends \Drupal\Core\Field\FieldItemList now, not \Drupal\Core\Field\FieldItemBase. This fixes the issue.

As result, extracting computed name value via $contributorEntity->name->value is possible now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.