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
Comment #2
bbu23Added 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.
Comment #3
bbu23Comment #4
saesa commentedbbu23 could you update the patch?
Comment #5
bbu23@saesa sure, I've updated it. I changed a bit the logic, I'm using now the
defaultConfigurationmethod instead of isset. Thanks!Comment #6
bbu23Comment #8
saesa commentedThank you for your work!