Problem/motivation

This module's plugin block will return a NULL value under certain circumstances. Per the plugin block contract, the build() method needs to return a renderable array. The failure to return a renderable array results in triggering a fatal error when this module is enabled along with Drupal Canvas. See #3570822: Canvas shows error when trying to build page through Canvas.

Steps to reproduce

  1. Install this module and Drupal Canvas.
  2. Create a new Canvas page and click on the "+" icon to add a block
  3. Observe error "Error 500: Drupal\Core\Render\Element::isEmpty(): Argument #1 ($elements) must be of type array, null given"

Proposed resolution

Return an empty array rather than a NULL value in $block->build()

Issue fork google_cse-3586779

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

mark_fullmer created an issue. See original summary.

mark_fullmer’s picture

Status: Active » Fixed

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.