Do I have to manually update if I manually made changes to system configuration?

Awhile back when I updated 1.1.0 to 1.1.1 I lost all my manual config changes when I updated through the admin panel. Things like admin page address were reset and lost my custom media file list yaml entries. It’s been a while since I updated so I’m wondering if this means I have to do a manual update instead of automatic one? Or is there a better way? Thanks!

TLDR, that shouldn’t have happened. Someone with more experience with the Admin panel can perhaps chime in. I assume the Admin panel saves plugin config files correctly.

The only safe place to store pages, data, and config is in the user folder. But even then, user/plugins is not safe. You should save plugin config in user/config/plugins. Updating Grav will reset all the folders outside of user. Updating plugins will reset the given user/plugins folder. Updating themes will reset the given user/themes folder. The other user folders (like data and pages) are safe.

I see I was making changes directly in systems/config that’s probably why so I’ll try adding them user/config instead

Interesting you mentioned users/themes will reset because it happened to me when I updated my theme after I made some custom changes as well like losing my custom footer sidebars. Does this mean i should never update my theme unless I’m prepared to edit back the changes?

this is the way to do it with themes: https://getgrav.org/blog/theme-development-with-inheritance

hello I’m reviving this thread because I just updated Grav from 1.1.1 to 1.1.15 and I lost my admin panel settings even though I changed it the users folder

This is pretty inconvenient.

What ‘admin panel settings’ do you mean exactly?
Most relevant folders for site and admin are:
usr/config/system.yaml
usr/config/site.yaml
usr/config/plugins/admin.yaml

Settings should not change with updates. As @arank asked, which setting in particular did you lose?

Specifically lost the admin page route, it reset to /admin
I apologize it was after updating admin plugin not updating grav.

It’s not possible for an admin update to reset values in the user/config folder because all the installation does is copy the files of the plugin which will be in user/plugins/admin.

What is possible is the name or the YAML field might change and then it would appear to be lost, but this did not change for the admin route, so not really sure what could of happened. Are you sure the data in user/config/plugins/admin.yaml changed??? Or did you perhaps have that one setting modified in user/plugins/admin/admin.yaml by accident?

I’m fairly certain I the file I modified was user/plugins/admin/admin.yaml

I also just checked there is no admin.yaml under user/config/plugins/admin.yaml

I was super careful this time because I started this threading thinking my settings would disappear after I upgrade. Because last time I lost all my custom media file entries and the admin route. I made sure I only edited the media.yaml under the users folder, and same thing with the admin.yaml. This time when I updated the media.yaml perserved but the admin.yaml was reverted again.

Ok, maybe you are misreading. You must only edit user/config/plugins/admin.yaml. If you don’t already have a config file you can simply copy the user/plugins/admin/admin.yaml file into the user/config/plugins/ folder.

If you use the admin plugin to make changes, it will automatically create this file.

So to reiterate, don’t modify anything in user/plugins/... these will get overwritten with updates. For plugins always copy the config from user/plugins/... to user/config/plugins/... and modify there.

I see I’ll do that the next time I update. May I suggest create a copy automatically in the config/plugins folder upon grav installation rather than manual copy?

Look in the reply of rhukster above:
“If you use the admin plugin to make changes, it will automatically create this file.”

And if you don’t make your changes via admin panel, why do you install it?
If your using ftp, ssh etc, where’s the problem of copying a file?

I’m really sorry please forgive my ignorance.

I wrongly assumed that admin plugin was configured via the settings tab, which until I just saw the the subtabs didn’t include admin.yaml. Which was why I always configred admin.yaml from the console. I found admin.yaml in the grav folders and just edited it there and led to this problem.

And now I also just found admin plugin can be configured from the plugins page so I feel really stupid now.

sorry for wasting your time

Well, your right: the docs could be a bit more precise. No good description of admin plugin tab. Should be added.
Admin

Every plugin and theme, when updated, will overwrite the files in its own folder. There is no way to preserve your changes in user/plugin/ and user/themes/.

The settings in particular are stored under user/config/plugins/ and user/config/themes/, when you save a plugin/theme configuration in Admin, the edits are stored there, and never overwritten in an update.