I`m using core 8.5 commerce 2.5 facets 1.0-beta2.
When reload page i get this error in logs:

Error: Call to a member function isRenderedInCurrentRequest() on null in Drupal\facets\Plugin\Block\FacetBlock->build() (line 82 of /home/.../modules/contrib/facets/src/Plugin/Block/FacetBlock.php) #0 /home/.../core/modules/block/src/BlockViewBuilder.php(203): Drupal\facets\Plugin\Block\FacetBlock->build() #1 [internal function]: Drupal\block\BlockViewBuilder::preRender(Array) #2 /home/.../core/lib/Drupal/Core/Render/Renderer.php(378): call_user_func('Drupal\\block\\Bl...', Array) #3 /home/.../core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, true) #4 /home/.../core/lib/Drupal/Core/Render/Renderer.php(151): Drupal\Core\Render\Renderer->render(Array, true) #5 /home/.../core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() #6 /home/.../core/lib/Drupal/Core/Render/Renderer.php(152): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #7 /home/.../core/lib/Drupal/Core/Render/Renderer.php(166): Drupal\Core\Render\Renderer->renderPlain(Array) #8 /home/.../core/modules/big_pipe/src/Render/BigPipe.php(696): Drupal\Core\Render\Renderer->renderPlaceholder('callback=Drupal...', Array) #9 /home/.../core/modules/big_pipe/src/Render/BigPipe.php(550): Drupal\big_pipe\Render\BigPipe->renderPlaceholder('callback=Drupal...', Array) #10 /home/.../core/modules/big_pipe/src/Render/BigPipe.php(305): Drupal\big_pipe\Render\BigPipe->sendPlaceholders(Array, Array, Object(Drupal\Core\Asset\AttachedAssets)) #11 /home/.../core/modules/big_pipe/src/Render/BigPipeResponse.php(112): Drupal\big_pipe\Render\BigPipe->sendContent(Object(Drupal\big_pipe\Render\BigPipeResponse)) #12 /home/.../vendor/symfony/http-foundation/Response.php(371): Drupal\big_pipe\Render\BigPipeResponse->sendContent() #13 /home/.../index.php(20): Symfony\Component\HttpFoundation\Response->send() #14 {main}.

I have patch for fix this

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andriy_novak created an issue. See original summary.

andriy_novak’s picture

Assigned: andriy_novak » Unassigned
andriy_novak’s picture

Status: Needs review » Needs work

The last submitted patch, 3: fix_FacetBlock_isRenderedInCurrentRequest.patch, failed testing. View results

andriy_novak’s picture

andriy_novak’s picture

Status: Needs work » Needs review
borisson_’s picture

Issue tags: -facet

I can't reproduce this issue. What kind of field are you creating the facet on?

borisson_’s picture

Status: Needs review » Postponed (maintainer needs more info)
ndf’s picture

Title: Fasets isRenderedInCurrentRequest error » Error: Call to a member function isRenderedInCurrentRequest() on null
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Active

We have this too while deploying.
Error: Call to a member function isRenderedInCurrentRequest() on null in Drupal\facets\Plugin\Block\FacetBlock->build() (line 82)

Still don't know what triggered this so under investigation.

Tess Bakker’s picture

Status: Active » Needs review

This happend when you change the view page id, you can fix the issue by renaming 'facet_source_id' in your facet config file according to the new page id. After that, import the config file again.

Alex G’s picture

Can confirm the patch worked for me in #5 worked for me.

Nick_vh’s picture

Status: Needs review » Fixed

Committed. Also removed the trailing space.

  • Nick_vh committed fdce82f on 8.x-1.x authored by andriy_novak
    Issue #2957129 by andriy_novak, Nick_vh: Error: Call to a member...

Status: Fixed » Closed (fixed)

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