- Issue created by @Anybody
- Merge request !7901Issue #3442297 by mondrake: Change @dataprovider to static in DrupalComponentTest β (Closed) created by Anybody
- π©πͺGermany Anybody Porta Westfalica
Implemented the suggestion from @longwave (from π Warning: Undefined array key 1 in Drupal\Core\Asset\LibraryDependencyResolver->doGetDependencies() after update to Drupal 10.2.2 and when views ajax is enable. Active ) in the MR and added some comments.
I can't go into details about the if clause and the message, as I don't really understand what it really does and what this can be caused by.So I don't know what exactly we can tell in the Exception or not.
- π¬π§United Kingdom catch
A library has to be in the format
foo/bar
, so this is just detecting if someone putssomerandomstringthatisnotalibrary
in the query parameter somewhere. We just overlooked that people apparently usefoo/bar/baz
sometimes, which is unexpected but possibly not wrong (or even if it's wrong worked until we broke it/So something like
Check that libraries are in the correct format
should be fine I think? - First commit to issue fork.
- Status changed to Needs review
8 months ago 11:03am 3 May 2024 - π¬π§United Kingdom longwave UK
Updated the comment and exception message to be more useful.
- Status changed to RTBC
8 months ago 12:27pm 3 May 2024 - π©πͺGermany Anybody Porta Westfalica
Thanks @longwave, RTBC from my side, this clearly points out what happens. Perhaps @catch should sign this off, then this is ready to go?
- π¬π§United Kingdom longwave UK
Slightly surprised PHPStan did not pick up the invalid use of formatting on commit, but oh well, the tests caught it.
- π¬π§United Kingdom catch
Much better. Committed/pushed to 11.x and cherry-picked to 10.4.x/10.3.x/10.2.x, thanks!
- Status changed to Fixed
8 months ago 3:46pm 3 May 2024 - πΊπΈUnited States thejimbirch Cape Cod, Massachusetts
I ran into this on a 10.2.6 site. This was merged into 10.2.x a few days after that was released. So if you run into this until 10.2.7 comes out...
I patched drupal/core using a diff of the merge. The file URL for that is:
https://git.drupalcode.org/project/drupal/-/commit/81671bc5b9df29774a774...
Hope that helps.
The error message was:
Symfony\Component\HttpKernel\Exception\BadRequestHttpException: The libraries to include are encoded incorrectly. in Drupal\system\Controller\AssetControllerBase->Drupal\system\Controller\{closure}() (line 168 of /code/web/core/modules/system/src/Controller/AssetControllerBase.php).
We were getting 400 errors on the JS files causing Admin Toolbar to print without styles.
Thanks for the issue and the fix! This was a squirrely one!
Adding this patch fixed the problem. Never could identify which library had an issue, or if there was a real issue.
- πΊπΈUnited States Shawn DeArmond
We ran into this yesterday on a 10.2.6 site. In our case, it was the Decoupled Blocks β module.
π Drupal 10.2.6 causes libraries to fail Active
Automatically closed - issue fixed for 2 weeks with no activity.