Missing namespace for BlockContentType in groupblock_block_content_type_insert()

Created on 9 January 2024, 6 months ago
Updated 24 January 2024, 5 months ago

Problem/Motivation

With groupblock enabled (2.x, but 3.x should have the same issue), when you create a new block content type, you get a error like this:

TypeError: groupblock_block_content_type_insert(): Argument #1 ($block_content_type) must be of type BlockContentType, Drupal\block_content\Entity\BlockContentType given in groupblock_block_content_type_insert() (line 21 of /opt/drupal/web/modules/contrib/groupblock/groupblock.module).

This is occurring because the typehint in groupblock_block_content_type_insert is not namespaced correctly with a use statement.

Steps to reproduce

1. Enable groupmenu
2. Create a new block content type and save
3. observe error screen and/or exception in log

Proposed resolution

Add use statemnt

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024