Problem/Motivation

When overriding the template, based on the module's instructions, several PHP warnings occurred
Warning: Undefined array key "elements" in Drupal\block\Hook\BlockThemeHooks->themeSuggestionsBlock()
Warning: Trying to access array offset on null in Drupal\block\Hook\BlockThemeHooks->themeSuggestionsBlock()

Steps to reproduce

  1. Install an enable the module
  2. Place the related block into a region (block layout)
  3. Override the provided template based on the instructions (Readme file)
  4. Clear cache
  5. Check the logs

Proposed resolution

Rename the template file to remove the "block" prefix. The drupal adds a "block__ prefix" when invalidating the cache.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

c.moisiadis created an issue. See original summary.

c.moisiadis’s picture

Assigned: Unassigned » c.moisiadis
Status: Active » Needs work

  • 79c67c74 committed on 1.0.x
    #3585107 apply some phpcs fixes and code updates
    

  • 2f5e5b8a committed on 1.0.x
    #3585107 typo fix
    

  • 21735924 committed on 1.0.x
    #3585107 rename twig template
    
c.moisiadis’s picture

Status: Needs work » Fixed

The fix is included in the latest release.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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