I confirm the patch from #6 works in our environments and fixes the problem. I switch the status to RTBC. Thank you to everyone.
We also had a problem with "Attempting to re-run cron while it is already running" and broken URLs.
We use drush cron and -l / --uri param which works fine normally, but cron occasionally gets triggered simultaneously from external visitors. These requests came through a reverse proxy which maybe triggered the broken host names being internal names for the newsletters.
Maybe this info helps you in finding the source of the problem.
Thank you for your help. I tested the merge-request and the changes to the migrate-command work like expected now.
Sadly the fix in my issue-fork is having other side-effects.
Our main problem is the different sorting of groups between requests, leading to different array sizes. The underlaying method explicitly warns about the different sortings in AssetResolver->getLibrariesToLoad()
.
The problem is also descriped in #3370930 and not fixed for us. It is really hard to reproduce. We use a lot of modules, including field_group, paragraphs, gin, ckeditor_abbreviation and lots more. The problem cant be dumped to a specific set for me.
We helped ourself with switching the weight of modernizr from -21 to -22 in drupal 10.3, but i have the feeling it is just a lucky fix for us. Both modernizr and touchevents-test have weight -21 in core.libraries.yml
and they switched indexes and then array sizes this way in our projects.
Since modernizr is gone in Drupal 11, i cant apply this change to the issue fork. This is the patch we use for drupal 10.3:
10.3.x-core-reorder_modernizr_library.patch
Can someone remove my issue-fork for 11.x please? :)
We are also having problems since the change in π LibraryDependencyResolver::getMinimalRepresentativeSubset() calculates dependencies incorrectly Fixed .
TLDR: We have a fix for sorting the AssetResolver so that the groups and hashes in the initial page request and the subsequent asset requests are the same.
Details:
We experience HTTP 400 errors from js-assets with the error:
Symfony\Component\HttpKernel\Exception\BadRequestHttpException: Invalid filename. in Drupal\system\Controller\AssetControllerBase->getGroup() (line 225 of /var/www/projectname/docroot/core/modules/system/src/Controller/AssetControllerBase.php)
The problem in our cases is that some of the libraries have preprocess = false
in their libraries description which leads to different sizes of JsCollectionOptimizerLazy->optimize
on the page request and AssetControllerBase->getGroups
on asset requests.
The different sizes are a result of the sorting in AssetResolver
. Currently this class sorts the same weights slightly different, depending on their place in getLibrariesToLoad
. Our approach is ordering by weight as before but ignoring the array index and ordering by name if weight is the same.
I opened an issue-fork for this change:
https://git.drupalcode.org/issue/drupal-3397713
harkonn β made their first commit to this issueβs fork.
The update-hook fixed the problem for our systems and is already running in our sites.
Side-node: We copied the code into our own update-hook into our profile so we don't run into problems with update-hook-versions in our projects.
Good work! :)
harkonn β created an issue.
harkonn β created an issue.
harkonn β created an issue.
I tested the code changes in the merge-request and the performance problems are solved this way.
Thanks for your quick help, really looking forward to use your module! :)
harkonn β created an issue.
Oh sorry, my change is a duplicate of
str_replace throws php error when source contains null
π
str_replace throws php error when source contains null
Fixed
.
I close this one. :)
I created a fix and merge request for the fix. I don't know, why the pipeline of the fork failed. :)
I hope the fix is easy and okay.
harkonn β created an issue.
The patch works. Thank you.