I created a new content type 'ToDo' and then this Goback module throws an error, when visiting a node of that new content type.
Clearing cache does not help.

Notice: Undefined index: ToDo in Drupal\go_back\Plugin\Block\GoBack->build() (line 392 of modules/contrib/go_back/src/Plugin/Block/GoBack.php).
Drupal\go_back\Plugin\Block\GoBack->build() (Line: 171)
Drupal\block\BlockViewBuilder::preRender(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)

Comments

Yuri created an issue. See original summary.

bbu23’s picture

StatusFileSize
new4.12 KB

Added the default config and some isset checks, although I think I could have set the default config more specific.
This patch will need to be updated if this issue is fixed: https://www.drupal.org/project/go_back/issues/3168991.

bbu23’s picture

Status: Active » Needs review
saesa’s picture

Status: Needs review » Needs work

bbu23 could you update the patch?

bbu23’s picture

@saesa sure, I've updated it. I changed a bit the logic, I'm using now the defaultConfiguration method instead of isset. Thanks!

bbu23’s picture

Status: Needs work » Needs review

  • saesa committed 86cc3b1 on 8.x-1.x
    Issue #3168855 by bbu23: Error after creating new content type
    
saesa’s picture

Status: Needs review » Fixed

Thank you for your work!

Status: Fixed » Closed (fixed)

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