snake Posted March 17, 2020 Share Posted March 17, 2020 I had put some custom css in my /templates/six/css/custom.csscustom.css file, which accoridng to the docs, should not get overwritten by updates. However, it has been overwritten and all my changes are gone. How, why and what can I do to stop this occurring again? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted March 17, 2020 Share Posted March 17, 2020 The only way to avoid it would be to never use the default template folder since WHMCS includes a blank custom.css in it by default. Make a new theme, with a new name, in a new folder, and copy all the files to that from the default theme you're using. Once that's done, tell WHMCS to use that theme on your site. The downside is you will need to manually edit that theme to be sure it's got the current code changes in the main theme after every update. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 17, 2020 Share Posted March 17, 2020 8 hours ago, snake said: I had put some custom css in my /templates/six/css/custom.csscustom.css file, which according to the docs, should not get overwritten by updates. it does state that, but it's wrong. https://developers.whmcs.com/themes/css-styling/ Quote This file is included after styles.css allowing you to override any of the CSS defined within it and will not be affected by future updates to the WHMCS software. but then you also get... https://developers.whmcs.com/themes/getting-started/ Quote Before you begin customising it for your needs, the first step is to create your own copy of the template. This ensures your customisations are not lost when updating. yet it's the automatic updating of custom.css that would make the above necessary - there is literally no reason to a) have an existing custom.css file shipped with Six in the first place, and b) to subsequently overwrite it by default via the updater. 8 hours ago, snake said: However, it has been overwritten and all my changes are gone. if you were using the automatic updater, it should tell you that the file is about to be overwritten and to make a copy of those listed files... if updating via ftp, then it will overwrite it with it's default blank custom.css if you want an interesting read, and a demonstration of why WHMCS is in the mess that it's currently in, take a look at the thread below about this issue last month... 8 hours ago, snake said: How, why and what can I do to stop this occurring again? for how & why see above - going forward, options include.. keep a backup of the custom.css file - especially before updating. go down the road of duplicating the template - though if you're only customising with css and hooks, this seems a pointless step to me. use a hook to define a custom custom.css url to be used that the updater/ftp won't automatically overwrite. 0 Quote Link to comment Share on other sites More sharing options...
snake Posted March 17, 2020 Author Share Posted March 17, 2020 a bug that has been around for years and never fixed... I am so shocked and surprised NOT :-) 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted March 17, 2020 Share Posted March 17, 2020 The 'six' template will always get overwritten. That's the default template. It's not a bug. Just create a copy of the six template. 0 Quote Link to comment Share on other sites More sharing options...
snake Posted March 17, 2020 Author Share Posted March 17, 2020 i suggest you go read what it says in the documentation, which Brian has clearly quoted above for you. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 17, 2020 Share Posted March 17, 2020 Just now, snake said: i suggest you go read what it says in the documentation, which Brian has clearly quoted above for you. being pedantic for a moment, but Dennis is right that it's not a bug, e.g it's doing something that WHMCS doesn't expect it to.... it's working exactly as WHMCS want it to, it's just that some of us are saying that it's silly. however, they're not going to change this... so you'll either have to fall in line and duplicate the template, or workaround the updater by one of the above methods. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.