Closed (fixed)
Project:
Environment Indicator
Version:
4.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2022 at 13:18 UTC
Updated:
6 Feb 2023 at 19:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jurgenhaasComment #3
e0ipsoThis looks good! I like this feature.
Is there a chance that
$variables['attributes']['class'][] = 'environment-indicator';fails because$variables['attributes']or$variables['attributes']['class']are not defined?Comment #4
jurgenhaasThat's a great question. I just looked through core and many contrib modules, all seem to be doing the same as the patch above and none is checking for the existence of the arrays. TBH, the body always has some classes, and therefore it seems to be a safe assumption that those components really exist.
Comment #5
e0ipsoI made some small fixes on commit.
Comment #7
jurgenhaas@e0ipso looks like this is not in the latest release anymore. Have we lost this by accident?
Comment #8
jurgenhaasIn fact it looks as if the commit never landet in the code base.
Comment #9
e0ipsoYou are correct! Thanks for noticing.
I can't remember what the changes were, so I committed your patch directly. Hopefully all is good now.
Comment #10
jurgenhaasThis is great, thank you.
Comment #11
justcaldwellThis is a great addition! Is there a reason we don't add the class if toolbar integration is enabled?
Comment #12
justcaldwellDisregard. I can see now how there might need to be adjustments only when toolbar integration isn't enabled.
I'll handle my use case with custom code. Thanks!