I am inserting one extra item to the "#items" key, altering the facets block "#pre render". The below fatal error occurs while doing so.

Error: Call to a member function getWidget() on null in facets_theme_suggestions_facets_result_item() (line 429 of modules/contrib/facets/facets.module).

CommentFileSizeAuthor
#2 facets-3027215-2.patch762 bytesmalaynayak
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

malaynayak created an issue. See original summary.

malaynayak’s picture

FileSize
762 bytes

In facets_theme_suggestions_facets_result_item , adding an extra check fixes the issue.

Adding the patch for it.

malaynayak’s picture

Status: Active » Needs review
borisson_’s picture

Status: Needs review » Reviewed & tested by the community

Sure, it seems like a good idea to be more defensive here.

  • borisson_ committed b79de5e on 8.x-1.x authored by malaynayak
    Issue #3027215 by malaynayak, borisson_: Call to a member function...
borisson_’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed, thanks.

Status: Fixed » Closed (fixed)

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