Upgrade to 5.30.x causes "Unrecognized asset name: crm-menubar.css" under Drupal 8 or 9
- Upgrade a Drupal 8 or 9 site to CiviCRM 5.30.+
- Clear caches or just click on CiviCRM.
- Got a white screen with "The website encountered an unexpected error. Please try again later.".
27-Nov-2020 14:45:13 Europe/London] Uncaught PHP Exception Civi\Core\Exception\UnknownAssetException: "Unrecognized asset name: crm-menubar.css" at D:\CiviCRM_Custom.git\drupal8\vendor\civicrm\civicrm-core\Civi\Core\AssetBuilder.php line 217
What should happen.
You should get the CiviCRM web page.
- Browser: Edge but probably irrelevant
- CiviCRM: 5.30.0/5.31.1/...
- PHP: 7.4..._ but probably irrrelevant
- CMS: Drupal 8/Drupal 9/... Not apparent in Drupal 7 or Joomla.
- Database: MySQL 5.7.7... but probably irrelevant
- Web Server: IIS This may be relevant
Anything else you would like the reviewer to note.
Extensive researched found that adding
before line 168 in
../vendor/civicrm/civicrm-core/CRM/Utils/Hook.php, in other words before the invoke function returns to its caller seems to solve the problem. I am not currently set up to produce a PR. It is possible that someone more expert than I can explain what the real issue is. It could be related to Composer and Windows.