Closed (fixed)
Project:
Environment Indicator
Version:
4.0.11
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2022 at 21:11 UTC
Updated:
3 Jan 2023 at 17:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jane_irwinComment #3
ankitjhakal commentedComment #4
ankitjhakal commentedAbove patch is not applying so created other one. Kindly review it. Issue is occurring when module is installed. Check any page it will throw error so after applying attached patch it's working fine.
Comment #5
syeda-farheen commentedComment #6
aramboyajyan commentedAttaching updated patch; #4 didn't work for me, line number was wrong.
Comment #7
aramboyajyan commentedUpdated patch file (without the .txt extension)
Comment #8
alexgreyhead commentedPatch file at #4 is correct - the patches at #6 and #7 have full paths which result in a file not found error when composer tries to apply the patch.
In case it helps, you need the following in your composer.json:
You'll also need to save patch #4 into a patches/ directory located alongside your composer.json.
Run composer install to patch the file:
/Alex
Comment #9
jane_irwinOh! Sorry for not truncating those filepaths. Thanks for the reminder!
Comment #10
amjad1233Patch #4 worked for me. Latest patch as mentioned had error.
Comment #11
alexgreyhead commented> Oh! Sorry for not truncating those filepaths. Thanks for the reminder!
No woz - apologies if my message sounded grumpy; it wasn't intended to be :-)
/Al
Comment #12
pianomansam commentedComment #13
joegl commentedPatch in #4 resolved fatal errors/test failures for us. Good mitigation of the issue for now.
Comment #14
dagmarWhile #4 fix the fatal error I don't think it is the proper fix. The environment name may not exist so getTitle() does not always return a string. Also it breaks the UI like this:
Comment #15
dagmarHere is a different approach.
When no environment name is set:
When the environment name is set:
Comment #16
dagmarSorry wrong patch.
Comment #17
amjad1233Side note but should this use $this->t instead ? I mean should it not return translatable markup ?
Comment #18
jlopes23 commentedI'd the same issue and the patch on https://www.drupal.org/project/environment_indicator/issues/3324429#comm... works as expected.
I've follow the same approach and to fix the issue before find the patch
thanks
Comment #19
jive01 commentedI can verify that Patch 4 works.
Comment #20
kurttrowbridgeI'm in the same boat as #14: I tested on a local environment that doesn't have an environment name set, and patch #4 results in a misalignment in the UI (see first attached screenshot; the red box is just from me redacting the username). I then tested patch #16 and confirmed that that is working (see second screenshot).
I'll wait to mark as RTBC until someone who does have an environment name tests #16, but that one looks good to me.
Thanks!
Comment #21
mayankguptadotcom commentedI can confirm that Patch 16 works with Drupal 9.5.0 on DDEV environment.
Here's what my patches object looks like in composer.json
And then
composer updateComment #23
e0ipsoThanks for the contribution everyone!
Comment #24
e0ipsoThis was released in 4.0.12.