- Issue created by @netgeek123
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;
}
Needs work
2.0
Code