Problem/Motivation

The latest release of the USWDS Drupal theme (v2.1) introduced a bug in their code when renders the primary and secondary menus. A check is being made for `property_exists` when `method_exists` was intended.

Steps to reproduce

Create a block menu and add it to a region. Observe that the `block__system_menu_block__[region]` theme hook is not applied to that block.

Proposed resolution

In the `uswds/includes/menus.inc` file, in the `uswds_theme_suggestions_block_alter()` function, update the check for the `getRegion` property to a check for a method.

CommentFileSizeAuthor
#2 3224041-1-fix-typo-from-3174443-fix.patch541 bytesemanaton

Comments

emanaton created an issue. See original summary.

emanaton’s picture

StatusFileSize
new541 bytes

Change call from `property_exists` to `method_exists`.

  • jrglasgow committed 598cce3 on 8.x-2.x authored by emanaton
    Issue #3224041 by emanaton: Site errors due to typo in recent fix for...
jrglasgow’s picture

Status: Active » Fixed

I apparently forgot to mark this as fixed when it was committed

Status: Fixed » Closed (fixed)

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