Closed BenoitCier closed 2 years ago
I think I seen same issue but don't remember how and when. Perhaps it needs first upgrade to a previous versions before upgrading to 1.1.10, because I could update without issues on an instance where I have others versions from the testing branch upgraded... I have to look in the history here https://github.com/YunoHost-Apps/garradin_ynh/commits/testing/conf to found if it needs a first upgrade on the script...
Another user is reporting the same issue today ...
I don't know much about this app, but it naively seems related to : https://github.com/YunoHost-Apps/garradin_ynh/blob/master/scripts/upgrade#L204
Basically the app overwrites any previous config.local.php
file ... If this file corresponds to where the app install parameters are stored then it probably means that we're just dropping any previous configuration ...
(Note that this piece of code is also present in the if [ "$upgrade_type" == "0.9.8" ]
earlier)
The proper way to proceed (assuming this is indeed the root cause of the issue) should be to add --keep="config.local.php"
to ynh_setup_source
during the upgrad and to not do any cp
that would overwrite the config file ..
I can try do this, I haven't seen before this option to keep the file with the new source app. But nevertheless, I am not sure it is the solution... This app is in constant evolution since the versions 1.. I have one on production where I have upgraded without problems, but from other versions... I think perhaps it need also a pre-upgrade from 1.0.7 to 1.1 before, as we have to do a pre-upgrade from 0.9.8.1 before upgrade to 1.0.
Ok, I try fixed this issue, working in the branch 1.1.1, you con see this here https://github.com/YunoHost-Apps/garradin_ynh/blob/ea4434f251465d48673fef59a26eadf93d41cd78/scripts/upgrade Need now testing... It would be interesting to test from an install with 1.0.7-ynh2, I will try do this to found the same issue...
I have a branch make 1.0.7 to try fix this issue, I have try to fix it on the branch 1.1, but it fails, I have reproduced the same error installing first the 1.0.7, then backup data (a squlite file from april so from the version 1.0.6) after I try update to the branch 1.1 with my fix but it is the same issue, I come back to the install.php page !
Ok, I found the solution and tested it, in the branch 1.1, here is the script upgrade with thz fix: https://github.com/YunoHost-Apps/garradin_ynh/pull/63/commits/e6473d4c7cc4c527eb7eea2e1143caaa5687a3d8 There is a PR to push the changes on master branch, I need a reviewer ! @BenoitCier can you try my fix ? I have edit also the testing branch with this fix !
Another user is reporting the same issue today ...
I don't know much about this app, but it naively seems related to : https://github.com/YunoHost-Apps/garradin_ynh/blob/master/scripts/upgrade#L204
Basically the app overwrites any previous
config.local.php
file ... If this file corresponds to where the app install parameters are stored then it probably means that we're just dropping any previous configuration ...(Note that this piece of code is also present in the
if [ "$upgrade_type" == "0.9.8" ]
earlier)The proper way to proceed (assuming this is indeed the root cause of the issue) should be to add
--keep="config.local.php"
toynh_setup_source
during the upgrad and to not do anycp
that would overwrite the config file ..
Done also, and add a condition which resolve a pre-upgrade to 1.1.0 because was also necessary.
Hello, I think this time the script upgrade is working and resolve this issue, waiting for a reviewer to push the PR #63
I think this issue could be closed...
I agree, i close it, but i have found an other issue
Edit: i solve my problem
Hello,
current_version: 1.0.7 ~ ynh2 id: garradin__2 label: Garradin new_version: 1.1.10 ~ ynh1
the upgrade pass but after upgrade the admin page redirect to the install.php page. I'm not sure it's the same issue as the other opened