This was touched on briefly in another thread I started, but I wanted to start a dedicated thread for the topic.
I read in the documentation that it's a good practice to copy a template, make my changes there, and I am safe from losing my changes when upgrading.
I was also advised that it's better to not do that, because I won't get any fixes that an update contains, because the update won't affect the template copy.
The changes I want to make will be mostly css changes (in a custom user.css file), but will likely include changes other than css.
So what's my best option?
Help me understand the best way to protect my template changes during upgrades.
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
-
- Joomla! Apprentice
- Posts: 28
- Joined: Thu May 20, 2021 6:22 pm
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Help me understand the best way to protect my template changes during upgrades.
Where does the documentation say it's better—or best practice—to "copy a template" just for the sake of making some customised sytle changes (e.g. changing the background colour of an HTML element)? What URL are you quoting from?
That's a way that guarantees you won't be able to apply bug fixes to a template when you update J! or, in the case of a third-party template, extension updates when they're released.
That's a way that guarantees you won't be able to apply bug fixes to a template when you update J! or, in the case of a third-party template, extension updates when they're released.
-
- Joomla! Apprentice
- Posts: 28
- Joined: Thu May 20, 2021 6:22 pm
Re: Help me understand the best way to protect my template changes during upgrades.
To clarify, I didn't actually say that the documentations says it's better or even "best practice".
https://docs.joomla.org/J3.x:Modifying_ ... !_Template
- Webdongle
- Joomla! Master
- Posts: 44072
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Help me understand the best way to protect my template changes during upgrades.
Upgrades to Protostar will not alter your changes in user.css. But if you change anything else then it will be lost with an update. In that case make a copy as the docs page says.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Help me understand the best way to protect my template changes during upgrades.
I will be brief: the guide https://docs.joomla.org/J3.x:Modifying_ ... !_Template was first written in 2008 (before there was a template copy feature) then substantially altered in 2013 with the arrival of J! 3.1. The guide was last updated in November 2014; it does not represent current conventional thinking. The world has changed much over the past decade.
I could write a book on what may be considered "best practice"—it would be out of date five minutes after it was published—and so I will resist that urge. @Webdongle and I are in basic agreement about one thing although we're saying in different ways: if you want to make any changes to any source file that was originally shipped with a J! extension—templates are just one example of J! extensions—then you're on your own! If the extension allows its users to add their own files (e.g. user.css in the case of Protostar) then so much the better; those files will not be affected when the extension is updated. If you make a copy of an extension then it will not be affected by any subsequent update. In other words, if it's faulty then it will remain faulty; if the environment around it changes, and the "copy" is incompatible with that environment, then it's your job to fix the "copy".
[redacted - please keep the communication in the forum.]
I could write a book on what may be considered "best practice"—it would be out of date five minutes after it was published—and so I will resist that urge. @Webdongle and I are in basic agreement about one thing although we're saying in different ways: if you want to make any changes to any source file that was originally shipped with a J! extension—templates are just one example of J! extensions—then you're on your own! If the extension allows its users to add their own files (e.g. user.css in the case of Protostar) then so much the better; those files will not be affected when the extension is updated. If you make a copy of an extension then it will not be affected by any subsequent update. In other words, if it's faulty then it will remain faulty; if the environment around it changes, and the "copy" is incompatible with that environment, then it's your job to fix the "copy".
[redacted - please keep the communication in the forum.]
- Webdongle
- Joomla! Master
- Posts: 44072
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Help me understand the best way to protect my template changes during upgrades.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 28
- Joined: Thu May 20, 2021 6:22 pm
Re: Help me understand the best way to protect my template changes during upgrades.
Thanks guys. Good info. @sozzled, I just might take you up on that offer.