Same issue like here: #19420 (comment) - but it's closed and I was asked to create a new issue.
Tried to copy a template which did not work.
Labels |
Added:
?
|
Status | New | ⇒ | Confirmed |
I think it fails in the fixTemplateName method (
) where it tries to rename the language files.That's where we have to change the code so it looks up the language files both in the local language folder and in the global one. For the global one, it obviously has to filter the files by template name and not just blindly copy each ini file
Does it not have to be first done in the copy method?
// Copy all files from $fromName template to $newName folder
if (!Folder::copy($fromPath, $toPath) || !$this->fixTemplateName())
{
return false;
}
I.e. creating a new language
folder to $toPath
containing the necessary files from the core language folder, and this for every language installed.
The copy there just copies the whole template folder. The custom stuff is done in the fixTemplateName as it looks. Maybe it would make sense to create a new method which copies the language files if needed?
Maybe it would make sense to create a new method which copies the language files if needed?
And create the folder.
That would be the easiest to maintain as it is not a 2 lines of code (every installed languages + taking care of with/without prefix).
I have a broad idea how it could be done. I'll try if I can do something this weekend.
There are other assets to take care of, i.e. in media/templates/nameoftemplate
See #26259 (comment)
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-04-26 14:04:14 |
Closed_By | ⇒ | Quy |
The issue is that the language folder in our Cassiopea template was taken off, which means the whole copy template code has to be modified to also check for the template language files in the core language folders, this whether copying a site or admin template.
See #23493
Specially #23493 (comment)
and
#23493 (comment)