Problem/Motivation

I have a custom block type which renders a custom render element with the build() method, which also contains a #menu_name property on the render element. When I enable menu_item_extras module, this block no longer renders correctly, due to menu_item_extras_preprocess_block(). It looks like it could be a little more specific in it's targeting.

Proposed resolution

Add some more specific logic in menu_item_extras_preprocess_block() to only apply to the desired block types.

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#2 3176154-fix-preprocess-block.patch758 bytesdave reid
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Dave Reid created an issue. See original summary.

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new758 bytes

I think this might help check that we're only affecting blocks that use $variables['content']['#theme'] starting with 'menu__', which would apply to the SystemMenuBlock and anything that extends it (like Colossal Menu).

ozin made their first commit to this issue’s fork.

  • ozin committed b198a37 on 8.x-2.x authored by Dave Reid
    Issue #3176154 by Dave Reid: menu_item_extras_preprocess_block() should...
ozin’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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