Found a bug for depreciated code.

Created on 31 March 2025, 9 days ago

Problem/Motivation

Error
TypeError: Drupal\Core\Render\MainContent\AjaxRenderer::renderResponse(): Argument #1 ($main_content) must be of type array, null given, called in /home/townscanada/public_html/core/lib/Drupal/Core/Form/FormAjaxResponseBuilder.php on line 89 in Drupal\Core\Render\MainContent\AjaxRenderer->renderResponse() (line 49 of /home/townscanada/public_html/core/lib/Drupal/Core/Render/MainContent/AjaxRenderer.php)

Fix on line 85 ActionLinkBase.php :

/**
* {@inheritDoc}
*/
/*public function getAsFlagLink(FlagInterface $flag, EntityInterface $entity) {*/
public function getAsFlagLink(FlagInterface $flag, EntityInterface $entity, ?string $view_mode = null): array {
$render = [];
$action = $this->getAction($flag, $entity);
$access = $flag->actionAccess($action, $this->currentUser, $entity);

if(!$access->isAllowed()) {
return $render;
}

🐛 Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

🇨🇦Canada netgeek123

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

Comments & Activities

Production build 0.71.5 2024