Closed (fixed)
Project:
Environment Indicator
Version:
4.0.20
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Dec 2024 at 01:17 UTC
Updated:
31 Dec 2024 at 09:34 UTC
Jump to comment: Most recent
Comments
Comment #3
atowl commentedComment #4
heddnFixes the issue.
Comment #5
isholgueras commentedMaybe I'm missing something but I don't know how this patch could solve the issue.
A value for
version_identifiercould beenvironment_indicator_current_releasehttps://git.drupalcode.org/project/environment_indicator/-/blob/4.x/conf...
The available options for the
version_identifierare:-
environment_indicator_current_release-
deployment_identifier-
drupal_version-
nonehttps://git.drupalcode.org/project/environment_indicator/-/blob/4.x/src/...
but not
environment_indicator.current_releaseI'm also unable to reproduce the error.
From what version are you updating? 4.0.19 or earlier? What error do you get when you update from 4.0.19 to 4.0.20?
Thanks!
Comment #6
trackleft2I am unable to reproduce, but in theory the error is occurring because the parameter passed to
getVersionIdentifieris null instead of a string.protected function getVersionIdentifier(string $type): ?string {Should be updated to allow a null value like
protected function getVersionIdentifier(?string $type): ?string {See https://git.drupalcode.org/project/environment_indicator/-/merge_request...
Comment #8
trackleft2Comment #9
helmo commentedBoth !81 and !82 solve the issue for me.
Comment #10
atowl commentedHi @isholgueras,
We're upgrading from 4.0.19 -> 4.0.20.
Appending to the reproduction, we noticed it during a drush deploy.
I'm not a fan of changing the getVersionIdentifier parameter to ?string, because it should never be null i don't believe.
Comment #11
andriic commentedUpgrading from 4.0.19 => 4.0.20.
Missing configs values in environment_indicator.settings.yml leads to this error.
This could happen if you didn't export configs after module update.
Adding manually to the file and re-import configs fix the issue.
Comment #13
isholgueras commentedI was able to reproduce the issue by running the following command to delete the config:
And this happens because the module was updated but the
environment_indicator_update_8101didn't run.I've created a new MR and I prefer to set a default value in case the config is not set. It seems that the problem is that the
hook_update_Nis not working well, but I think this will fix the issue safely.By default I've added the same values we have in the
environment_indicator.settings.ymlComment #14
joegraduateMR !82 seems like the correct fix to me. +1 for RTBC on that MR.
Comment #15
trackleft2Both !82 and !83 look good to me, I've tested both, and both work fine.
It is concerning that the update isn't working as expected, we might consider moving it to an environment_indicator.post_update.php file.
Comment #17
isholgueras commentedIt's strange, because if I run:
and
in branch
4.x, the site breaks. After I rundrush updball works.If I run both commands in the branch of MR83, the site works well, and if I run
drush updbthe update prompts well, runs and everything works well.I'm going to merge MR83 and release it in the 4.0.21.
Thanks all for the work and feedback. Much appreciated!