I am a theme developer and I am developing themes from last 2 years. I have a concern regarding the update channel of Joomla(Specifically for the Templates)
If a user try to update a purchased template in which he performed some override according to his need, then at the time of update all the override done by the user in that template will vanish because the new update will replace every file present in the template directory which will cause loss of his data and effort
So, therefore, we need to find a solution regarding this issue.
Yes Phil, i know its not a joomla bug but there should be some option to keep users overrides and new overrides in template updates seperate and working.
This is by design. This is not a Joomla bug.
If so, then it is a bad design :-p
It's a valid issue
nice one @Bakual ...
But we can store all the overrides of components and modules in html folder of template, but a user changes in overrides and updates the template overrides will be lost
Thinking about it, Phil may be correct
Do you mean the overrides provided by your template overwrite the edited ones by the user? The it is indeed expected behavior.
That case would be a user error as he should not edit the files in your template. Instead he should make a copy of the template and adjust the overrides in his copy. Because basically he creates a new template when he starts editing the files.
However if you mean that on an update, all overrides are deleted then that would be an error in your template.
Do you specify the html folder in your templateDetails.xml file? You should something along this lines:
<files>
<folder>css</folder>
<folder>html</folder>
<folder>images</folder>
<folder>js</folder>
<folder>modules</folder>
<folder>language</folder>
<filename>component.php</filename>
<filename>index.php</filename>
</files>
Then Joomla will not delete anything within the html
folder. It will just copy all files from the html folder in the zip to the html folder in the template directory, overwriting already existing files.
Thank you @Bakual so this detailed reply, well I always do the same as you've explained, and with data loss/lost of override, I meant user changes in overrides folder vanishes if he updates the templates. Because after update our template will have those override which we are providing as a template creating.
Basically, we have a component and we usually change its layouts in our different template according to UI. So for that, we need to do this through overrides and because of component fixes and it's version update we have to release template updates. But in between any user did any changes of in component override and then, later if he updates template his changes will be lost. Because our override updates will be installed.
That's why I m looking for any solution so that I can put that component override in any other folder other than HTML folder of the template so if a user want to do any changes they can do in HTML folder and I can store my overrides separately.
Some template providers have added their own override path support to their templates so a user can put overrides in a custom location that gets used before the normal Joomla paths. As far as core goes though, I don't think there is something we can do. If core added support for a path that overrides the override path, the same problem would exist if someone packaging the template put files in that location and the user was changing them in the same way they are the existing overrides. We aren't tracking metadata anywhere to know if a user altered files packaged in an extension (nor should we IMO, that would add a heavy storage burden and basically make use of the <folder>
tag in extension manifests impossible), so we have no way to give an instruction that says "user changed file X so it shouldn't be replaced".
It's indeed a valid issue, but to be honest, I think this falls under the "can't fix" category. Adding another override path would have the same problem, adding something to track changed files comes with a lot of complications that would destabilize the extension install adapters.
Status | New | ⇒ | Discussion |
@asfaqueali if this Discussion ends please don't forget to close this issue.
As written, the only real way to solve this is that the user copies the template before making any modifications. Similar to someone wanting to adjust the core Protostar template.. And we already have a button which allows to do this.
I'm closing this issue as "can't fix" or "not a core issue" (pick one yourself).
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-05-11 15:13:39 |
Closed_By | ⇒ | Bakual |
Title |
|
Title |
|
This is by design. This is not a Joomla bug.