- Issue created by @heyyo
- 🇮🇳India abhishek_virasat
@heyyo, I have fixed the issue and created MR, please review it once
- 🇮🇳India rohan_singh India
Hi,
Can you please help me with the steps to reproduce this issue?
As per the configuration, the paths key is defined as a sequence, which should return an array.mapping: paths: type: sequence label: 'Anonymous login page paths.' sequence: type: string label: 'Path'
Thanks!
- 🇩🇪Germany berliner
The problem seems to appear when updating from 1.x to 2.x, having existing configuration and using
drush deploy
(see https://www.drush.org/13.x/deploycommand/) as part of the deployment chain.
In this case, what happens is this:- The post update hook is run (as part of
drush updatedb
) and correctly changes the format of stored config paths in configuration to match the new type sequence - Config import is run and overwrites the changes from the previous step with the stored configuration in the now outdated format
So I guess, that the instead of a post_update hook, a deploy hook should be used.
- The post update hook is run (as part of
- 🇩🇪Germany berliner
This patch moves the logic of updating the format of the configuration from a post deploy hook to a deploy hook.
- 🇩🇪Germany berliner
Adding a new patch that should also work if the the post_deploy hook had already run.
- 🇨🇭Switzerland mullzk
Thanks @berliner for your patch. I tested it with my installation on 10.4.1 and can confirm that it works with
drush deploy
.However - now only
drush deploy
works; updating withdrush cr && drush updb && drush cr
does not change the config and leads to the mentioned issues. Shouldn't both ways be supported? - 🇮🇹Italy uccio Turin
I encountered this problem going back and forth between version 2.1 and 2.2.
I believe the problem is due to how version 2.2 saves the configuration following the https://www.drupal.org/project/anonymous_login/issues/3389754 ✨ Store paths as an array Fixed feature.However, I can confirm that by uninstalling and reinstalling the module in the chosen version and re-filling the form with the desired configuration, the module works correctly.
- 🇺🇸United States seanr
FWIW, I was able to simply save the config page and re-export the config. Following that, deploys work fine without causing the warning.
- 🇦🇹Austria golubovicm
Older version is saving paths config like:
paths: "~/api/*\r\n/admin*
while newer is saving it as array:paths: - '~/api/*' - '/admin*'
So, after module update it's enough to go to module's config page, save the config, eventually clear the cache and it will start working.
And if you have config somewhere in old format on your side that's being imported during the builds it has to be adjusted to new format.