ubc-web-services / galactus

A Drupal version of the UBC CLF theme
MIT License
6 stars 5 forks source link

Remove minification from remote library assets #70

Closed joelpittet closed 8 months ago

joelpittet commented 8 months ago

Core doesn't do this so there is no precedence, there is some in webform but I can't see how minifying a remote asset should be allowed.

The problem is when the remote asset throws an error and the result is cached it fails with

Exception: Only file CSS assets can be optimized. in Drupal\Core\Asset\CssOptimizer->optimize() (line 43 of /var/www/mds/releases/107/public/core/lib/Drupal/Core/Asset/CssOptimizer.php).

and


Warning: file_get_contents(https://cloud.typography.com/7574694/6365152/css/fonts.css): Failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden
 in Drupal\system\Controller\CssAssetController->generateHash() (line 43 of /var/www/mds/releases/107/public/core/lib/Drupal/Core/Asset/AssetGroupSetHashTrait.php) #0 /var/www/mds/releases/107/public/core/includes/bootstrap.inc(164): _drupal_error_handler_real()
#1 [internal function]: _drupal_error_handler()```