Feature No Code Attached Yet
avatar brianteeman
brianteeman
10 Feb 2022

It is no longer possible to copy a template that is enabled for child templates eg cassiopeia

This means that I cannot take cassiopeia and edit the index.php without fear of losing all my changes on update as the child template does not have its own index.php

avatar brianteeman brianteeman - open - 10 Feb 2022
avatar joomla-cms-bot joomla-cms-bot - change - 10 Feb 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 10 Feb 2022
avatar dgrammatiko
dgrammatiko - comment - 10 Feb 2022

That's by design. You can copy the contents of the index.php and create a file name index.php in your child template and paste the contents there. The idea is that you should not edit files that you do not own, but you can soft fork them...

avatar brianteeman
brianteeman - comment - 10 Feb 2022

:(

avatar dgrammatiko
dgrammatiko - comment - 10 Feb 2022

Also this probably should never be implemented as it will prevent namespaced templates, I think George already comment in another similar request/issue...

avatar Fedik
Fedik - comment - 10 Feb 2022

Probably some kind of "copy this file(s)" to my "child template" would be a good addition.

avatar dgrammatiko
dgrammatiko - comment - 10 Feb 2022

Probably some kind of "copy this file" to my "child template" would be a good addition.

There is no real UI for copying anything from a parent to a child right now and probably there should be. But not on the current codebase, the com_templates needs needs to be rewritten from the start, I already had started working on that but since it didn't made it for 4.0 it needs to wait for 5.0. Also doing it from the scratch brings opportunities to fix UX like the one that you were mentioning at the beginning of the child template journey (combine styles/childs, etc). Finally the point about dropping the copy template is not due to child templates but because at some point templates should be namespaced and copying php files with dedicated namespaces is extremely hard (if not impossible) to do without high error rate. For those that are still confused, please read the thread: #30816

avatar brianteeman
brianteeman - comment - 10 Feb 2022

Preventing the ability to copy a file because of a mythical you will be able to do that in the future is as daft as blocking useful functionality in the core because you've never needed that functionality

avatar dgrammatiko
dgrammatiko - comment - 10 Feb 2022

PHP namespacing is not a mythical you will be able to do that in the future. Joomla is mostly namespaced ALREADY
The only reason that the current templates weren't already namespaced for 4.1 was on the PT decision to delay it (for their own reasons). My personal plan was to have both templates namespaced in 4.1 (check this) but the namespacing got postponed...

Also you can still do that, not with a GUI...

avatar daniel-lenz
daniel-lenz - comment - 21 Feb 2022

That's by design. You can copy the contents of the index.php and create a file name index.php in your child template and paste the contents there. The idea is that you should not edit files that you do not own, but you can soft fork them...

Hi @dgrammatiko,
do you think this is a good design approach?

imho it is not the best approach, because if the parent template is updated and changed by an update of Joomla one has to possibly rework all the overrides and modifications done in the child template.

P.s.: I am not the only one thinking that this feature is really unneeded:
https://forum.joomla.org/viewtopic.php?f=808&t=992077

avatar Hackwar Hackwar - change - 17 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 17 Feb 2023
avatar Hackwar
Hackwar - comment - 17 Feb 2023

Just wanted to make clear that me adding the label "bug" is not judgment on if this is a valid bug or not, just that it isn't a new feature.

avatar dgrammatiko
dgrammatiko - comment - 18 Feb 2023

@Hackwar the request is for a new feature that doesn't exist for the new mode of the templates so clearly not a bug...

avatar Hackwar Hackwar - change - 27 Feb 2023
Labels Added: ?
Removed: bug
avatar Hackwar Hackwar - unlabeled - 27 Feb 2023
avatar Hackwar Hackwar - labeled - 27 Feb 2023
avatar brianteeman brianteeman - close - 21 Nov 2023
avatar brianteeman
brianteeman - comment - 21 Nov 2023

c

avatar brianteeman brianteeman - change - 21 Nov 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-11-21 18:16:09
Closed_By brianteeman
Labels Added: Feature
Removed: ?

Add a Comment

Login with GitHub to post a comment