can this be made to work with profile?

Created on 21 May 2019, over 5 years ago
Updated 1 November 2023, about 1 year ago

I hoped to use this module to flag a user when viewing their profile using the drupal profile module... no joy see below for the log error. Thought posting this here might possibly encorage this integration which would be exactly what I wanted, and atleast alert others having the same issue as to why it broke the profile pages when enabled and placed there. I want to be able to flag a user when viewing their profile... need to work out another way I guess...

TypeError: Argument 2 passed to Drupal\flag\Plugin\ActionLink\AJAXactionLink::getAsFlagLink() must implement interface Drupal\Core\Entity\EntityInterface, null given, called in /home/sites/***********.com/public_html/modules/contrib/flag/src/FlagLinkBuilder.php on line 47 in Drupal\flag\Plugin\ActionLink\AJAXactionLink->getAsFlagLink() (line 22 of /home/sites/***********.com/public_html/modules/contrib/flag/src/Plugin/ActionLink/AJAXactionLink.php) #0 /home/sites/***********.com/public_html/modules/contrib/flag/src/FlagLinkBuilder.php(47): Drupal\flag\Plugin\ActionLink\AJAXactionLink->getAsFlagLink(Object(Drupal\flag\Entity\Flag), NULL) #1 /home/sites/***********.com/public_html/modules/contrib/flag_block/src/Plugin/Block/FlagBlock.php(121): Drupal\flag\FlagLinkBuilder->build('user', '9', 'following') #2 /home/sites/***********.com/public_html/core/modules/block/src/BlockViewBuilder.php(163): Drupal\flag_block\Plugin\Block\FlagBlock->build() #3 [internal function]: Drupal\block\BlockViewBuilder::preRender(Array) #4 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Render/Renderer.php(378): call_user_func('Drupal\\block\\Bl...', Array) #5 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Render/Renderer.php(450): Drupal\Core\Render\Renderer->doRender(Array) #6 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Render/Renderer.php(450): Drupal\Core\Render\Renderer->doRender(Array) #7 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #8 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Template/TwigExtension.php(501): Drupal\Core\Render\Renderer->render(Array) #9 /home/sites/***********.com/public_html/sites/default/files/php/twig/5ce423be94299_row.html.twig_X1QYynyBarzAQL66JM7bUnvZg/dHwEaUcFl4OOHLAjnp5BCX5cOUgmhP6SNiYEmd3z99A.php(72): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) #10 /home/sites/***********.com/public_html/vendor/twig/twig/src/Template.php(443): __TwigTemplate_1d976b3ceecf68d04496af7aa2afba62b474acf324a7291bf43acc17353845f3->doDisplay(Array, Array) #11 /home/sites/***********.com/public_html/vendor/twig/twig/src/Template.php(414): Twig\Template->displayWithErrorHandling(Array, Array) #12 /home/sites/***********.com/public_html/vendor/twig/twig/src/Template.php(422): Twig\Template->display(Array) #13 /home/sites/***********.com/public_html/core/themes/engines/twig/twig.engine(64): Twig\Template->render(Array) #14 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('themes/cht__/te...', Array) #15 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Render/Renderer.php(437): Drupal\Core\Theme\ThemeManager->render('row', Array) #16 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Render/Renderer.php(450): Drupal\Core\Render\Renderer->doRender(Array) #17 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #18 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Template/TwigExtension.php(501): Drupal\Core\Render\Renderer->render(Array) #19 /home/sites/***********.com/public_html/sites/default/files/php/twig/5ce423be94299_page.html.twig_64dSn4287CPLoxsQLJvd-tBJx/hxaqxZqntpwLnkkIaO4jy4rYi9Fn4VwHuWIle7v6wtQ.php(63): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) #20 /home/sites/***********.com/public_html/vendor/twig/twig/src/Template.php(443): __TwigTemplate_d90351bad032092379b97b8b76d99306cb75e4187ffde392421c39791590bca7->doDisplay(Array, Array) #21 /home/sites/***********.com/public_html/vendor/twig/twig/src/Template.php(414): Twig\Template->displayWithErrorHandling(Array, Array) #22 /home/sites/***********.com/public_html/vendor/twig/twig/src/Template.php(422): Twig\Template->display(Array) #23 /home/sites/***********.com/public_html/core/themes/engines/twig/twig.engine(64): Twig\Template->render(Array) #24 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('themes/cht__/te...', Array) #25 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Render/Renderer.php(437): Drupal\Core\Theme\ThemeManager->render('page', Array) #26 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #27 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Template/TwigExtension.php(501): Drupal\Core\Render\Renderer->render(Array) #28 /home/sites/***********.com/public_html/sites/default/files/php/twig/5ce423be94299_html.html.twig_GjIo9c2WTNVk1DOnC4uq_VBeu/EToJs5ZjO_SC6I-lUBd35ELWJv-WCDpyZ11u52s5vT4.php(123): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) #29 /home/sites/***********.com/public_html/vendor/twig/twig/src/Template.php(443): __TwigTemplate_ac736d5c05cffb9af4cdbee487bbc1c91ee60b51f6fd8c73ae654b12123e7ca9->doDisplay(Array, Array) #30 /home/sites/***********.com/public_html/vendor/twig/twig/src/Template.php(414): Twig\Template->displayWithErrorHandling(Array, Array) #31 /home/sites/***********.com/public_html/vendor/twig/twig/src/Template.php(422): Twig\Template->display(Array) #32 /home/sites/***********.com/public_html/core/themes/engines/twig/twig.engine(64): Twig\Template->render(Array) #33 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('themes/cht__/te...', Array) #34 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Render/Renderer.php(437): Drupal\Core\Theme\ThemeManager->render('html', Array) #35 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #36 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(147): Drupal\Core\Render\Renderer->render(Array) #37 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() #38 /home/sites/***********.com/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(148): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #39 /home/sites/***********.com/public_html/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)) #40 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #41 /home/sites/***********.com/public_html/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)) #42 /home/sites/***********.com/public_html/vendor/symfony/http-kernel/HttpKernel.php(156): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent)) #43 /home/sites/***********.com/public_html/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #44 /home/sites/***********.com/public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #45 /home/sites/***********.com/public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #46 /home/sites/***********.com/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #47 /home/sites/***********.com/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #48 /home/sites/***********.com/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #49 /home/sites/***********.com/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #50 /home/sites/***********.com/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #51 /home/sites/***********.com/public_html/core/lib/Drupal/Core/DrupalKernel.php(693): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #52 /home/sites/***********.com/public_html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #53 {main}.

✨ Feature request
Status

Closed: outdated

Version

1.2

Component

Miscellaneous

Created by

πŸ‡¬πŸ‡§United Kingdom benjarlett

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024