Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme update - custom files overwritten #2135

Closed
grimnebluna opened this issue Apr 29, 2021 · 4 comments
Closed

Theme update - custom files overwritten #2135

grimnebluna opened this issue Apr 29, 2021 · 4 comments
Assignees

Comments

@grimnebluna
Copy link

Hi,

I am a theme developer and make use of a custom/ folder inside the theme folder structure which is declared in the .gitignore:

custom/css/
custom/logo/
etc.

Other themes use a custom.css as well. Since a couple of days (1.7.12 update?) the theme update process breaks sites with my themes, but also sites with other themes that are using a custom.css.

The custom folder gets deleted with the the theme update.

Is this intentional? What can I do? How do other theme developers deal with this? the custom.css was a really easy way for my users to customize their theme.

Thanks for a quick response (some of my sites will update automatically during the next few days, so i hope to fix it by then.

Thanks!

@mahagr mahagr self-assigned this Apr 29, 2021
@mahagr
Copy link
Member

mahagr commented Apr 29, 2021

I just checked both CLI and admin and it looks like there is a bug in admin, where it ends up replacing the folder instead of copying over it.

On my tests, CLI update seems to work, so if you update the files by using bin/gpm update, extra files seem to be kept.

@mahagr mahagr transferred this issue from getgrav/grav Apr 29, 2021
@mahagr mahagr added the bug label Apr 29, 2021
@mahagr
Copy link
Member

mahagr commented Apr 29, 2021

@grimnebluna

The above commit should fix the issue. In the meantime, if you do the theme update from CLI, it should work properly.

@mahagr mahagr added the fixed label Apr 29, 2021
@grimnebluna
Copy link
Author

thanks for your work and your quick action!

@mahagr
Copy link
Member

mahagr commented Apr 29, 2021

This should make sure that this issue can never happen again: getgrav/grav@9f5a15f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants