Islandora / documentation

Contains islandora's documentation and main issue queue.
MIT License
104 stars 71 forks source link

[BUG] Mirador from local file doesn't work with Aggregate Javascript #2251

Open rosiel opened 1 year ago

rosiel commented 1 year ago

Posting this here as I'm not sure which repository to put it in. It might be a configuration issue with nginx in buildkit and/or the site-template.

I'm running the Isle Site Template with a Starter Site based on 1.0.0 (running Drupal 10.1). I'm testing the Mirador PR that fixes the "use local library" option, so i'm on a page where an image is shown in mirador.

When javascript aggregation is off, Mirador and the image shows up from the local libraries folder (success!) But when javascript aggregation is on (default), the Mirador viewer does not show up at all (a blank empty space is displayed where the mirador viewer would be).

The console shows (truncated a really long alphanumeric string for courtesy):

The resource from “https://islandora.dev/sites/default/files/js/js__KsmWjh3S9c-3z1l3qc3F9jG0StLevS-CTl-GnWUOlg.js?scope=footer&delta=2&language=en&theme=olivero&include=eJx9[...]” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

The network tab shows (same long string truncated):

GET | https://islandora.dev/sites/default/files/js/js__KsmWjh3S9c-3z1l3qc3F9jG0StLevS-CTl-GnWUOlg.js?scope=footer&delta=2&language=en&theme=olivero&include=eJx9[...] 500 Internal Server Error

rosiel commented 1 year ago

Further info: On Drupal 10 served by Apache on a bare metal Mac, this problem does not occur.

More further info: Watchdog shows: Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames in Peast\Syntax\Parser->checkAsyncFunctionStart() (line 1405 of /var/www/drupal/vendor/mck89/peast/lib/Peast/Syntax/Parser.php). and "Location" was the really long URL truncated above.

rosiel commented 1 year ago

This is very likely related to this Drupal issue which locates the problem between XDebug and Peast. Comment 14 points out the known issue on Peast's page whcih suggests raising the xdebug.max_nesting_level...