The patch in #3404945-2: Uncaught TypeError: Drupal.toolbar is undefined β looks good to me. I note that that patch upload has a failing test at ResponsiveMenuAdminTest::testPolyfillsInclusion but that's unrelated to this change. (Separately see π Fix failing test Needs review which proposes removing that failing test)
I was seeing this behaviour on Drupal 10.3.7 with twig 3.14.1 . Given the fix from #3485956 doesn't seem to be deployed yet, I was able to manually composer require twig/twig:^3.14.2
to make sure I got past the bug from twig 3.14.1
I agree with the analysis in #2. Whilst the MR in #5 fixes the issue, I am concerned about the use of class_exists() because that couples the desired functionality in this module to the internal class strucure of the block_content module. A better approach might therefore be to inject the module_handler service into the perimssions callback and use that to check if the block_content module is installed - and then ensure that block_content is added to the list of providers used in block_permissions when constructing the list of permissions.
I've attached a patch that takes this approach which I'm happy to add to the MR if others agree with the approach.
For anyone else affected by this, a workaround is to use drush to set the relevant variable to an empty value (rather than having the form set it to a list of empty strings):
drush cset update.settings notification.emails []
The MR works for me - specifically I've checked with commit bd16830, which I can see now checks if the token.entity_mapper service is available. Thanks!