Recent Items block on the non-CiviCRM pages will have a missing CRM JS error
We've got a site where the Recent Items block is on a non-CiviCRM page. It seems to work but there's a JS error of the CRM
object is missing. I had put \CRM_Core_Resources::singleton()->addCoreResources();
in a custom event subscriber but that no longer plays nice with CiviCRM core. So perhaps adding it to the CivicrmBlock
plugin class would be better. It seems that Drupal can't assume that the block will have everything loaded. In my testing, adding it in __construct()
after $civicrm->initialize();
works.