Here's a re-roll of patch #2 on the latest 8.x-1.x as the previous one no longer applies.
Patch attached
alex.stanciu β created an issue.
Tests are trying to use 'classy' which no longer exists in D10. Let's try with 'starterkit_theme'.
alex.stanciu β created an issue.
Just wanted to say that we experienced this on a (quite high-traffic) production site today. We saw hundreds of occurences in the logs. With no alternative, we disabled JS aggregation until we have an official solution.
alex.stanciu β created an issue.
Added a deprecation notice and created a (draft) change record https://www.drupal.org/node/3378735 β
Third time's the charm?
Applied this to 11.x and fixed a failing test case.
I reworked this a bit on the 10.1.x branch addressing the previous comments:
- #88: I removed the JS changes, they did not seem necessary and was creating a very long query string. Click sorting persists between AJAX requests just fine. Not sure why we needed it in the first place, but in my testing, it works fine without it.
- #31 (1) I kept the key_value implementation but I added hooks for view_update, view_delete, block_update and block_delete. Whenever we update/delete a view or block, we remove the key_value entry. Thus eliminating the risk of bloat adding up over time
- #31 (2) I changed the key_value structure to be a nested array, keyed by the view id and reworked a bit the function used to generate the hash. Thus eliminating the risk of colisions.
- The last patch was not working at all on 10.1.x because it was using
->getRequest()->request->get()
I changed it to->getRequest()->query->get()
alex.stanciu β created an issue.
alex.stanciu β made their first commit to this issueβs fork.
alex.stanciu β made their first commit to this issueβs fork.
alex.stanciu β made their first commit to this issueβs fork.
Patch #7 works but it doesn't fix the initial problem. The problem appears when you are trying to lazy load SVGs. This can work if the SVGs are wrapped in an <img>
tag, but with this patch, they will simply be ignored. It's better to use $element['#items'] to load the file ID, which is the same even when we have ['#markup'] instead of the expected render array for files.