Closed (fixed)
Project:
Drupal core
Version:
9.5.x-dev
Component:
render system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
3 Mar 2020 at 06:22 UTC
Updated:
19 Jan 2023 at 16:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
silverham commentedagree.
Comment #4
silverham commentedAnd
#attachedproperty too.@see
\Drupal\Core\Render\BubbleableMetadata::applyTo()Comment #5
NitinLama commentedLet me know if this is fine.
Comment #7
NitinLama commentedLet's see.
Comment #8
NitinLama commentedComment #12
silverham commentedPervious patch only works is there is only 1 element.
Attached patch for 1, 2 or 3 number of elements.
Comment #13
silverham commentedComment #14
tanubansal commentedTested #12 on 9.1, its working for more than 1 element
Comment #18
smustgrave commentedJust a spelling fix
Comment #19
chi commentedThere are simpler ways to check this.
Also method documentation needs to be updated.
Comment #20
smustgrave commented@chi thanks!
Comment #21
chi commentedThank you.
Comment #23
catchCommitted/pushed to 10.1.x, cherry-picked to 10.0.x and 9.5.x, thanks! Not backporting to 9.4.x just in case there's something relying on the current behaviour somewhere.
Comment #25
silverham commentedThanks Team!
Re
There are simpler ways to check this.Wasn't sure which was the most performant way to do it. But it's only a single array, so maybe performance difference is too small to matter.
Comment #26
miiimooo@catch This change does more than it says in the issue title: it also removes output from block plugins that return the
#attachedproperty.Is this intended?
For me this breaks blocks that only attach drupalSettings for instance. Sure this must be affecting other sites
I've opened #3333858: Blocks that have #attached set removed after upgrade and added a patch to revert this behaviour
Comment #27
larowlanYes, this also caused https://drupal.org/project/nsw_feedback to stop working
Comment #28
chi commentedSounds like elements with #attached property shouldn't be considered as empty.
Comment #29
miiimooo@Chi I have also propose a patch in #3333858: Blocks that have #attached set removed after upgrade
Comment #30
chi commented@miiimooo Ok, I think it's better to continue work in #3333858: Blocks that have #attached set removed after upgrade.