? ?
avatar SharkyKZ
SharkyKZ
11 Sep 2019

Steps to reproduce the issue

Copy Atum template. Enable the copied template.

Expected result

Works.

Actual result

First Issue:

Warning: require_once(administrator\templates\atum2/Service/HTML/Atum.php): failed to open stream: No such file or directory in administrator\templates\atum2\index.php on line 35

Fatal error: require_once(): Failed opening required 'administrator\templates\atum2/Service/HTML/Atum.php' in administrator\templates\atum2\index.php on line 35

This is solved by adding missing Service folder to templateDetails.xml. But then there's another issue. The JS files are missing and this causes the template to break completely:

Screenshot_2019-09-11 Templates Styles (Administrator) - Joomla - Administration

Additional comments

Copy Template function needs to be updated to account for new asset paths.

avatar SharkyKZ SharkyKZ - open - 11 Sep 2019
avatar joomla-cms-bot joomla-cms-bot - change - 11 Sep 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Sep 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 11 Sep 2019
Labels Added: ?
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 11 Sep 2019
avatar infograf768
infograf768 - comment - 11 Sep 2019

Note: The copy template needs even more as we have a pr by @Bakual taking off the language folder from the core templates. I.e. it also needs to look into the core language folders for the ini files there. Would be good if a patch would include both issues.

ATM, we have only

			// Copy all files from $fromName template to $newName folder
			if (!Folder::copy($fromPath, $toPath) || !$this->fixTemplateName())
			{
				return false;
			}

in the copy() method.

I guess the fixTemplateName() method would also need to be refactored.

avatar franz-wohlkoenig franz-wohlkoenig - change - 11 Sep 2019
Status New Discussion
avatar infograf768 infograf768 - change - 3 Feb 2020
Labels Added: ?
avatar infograf768 infograf768 - labeled - 3 Feb 2020
avatar infograf768
infograf768 - comment - 3 Feb 2020

Setting as Release blocker.

@Bakual
Please follow up on your merged PR.

avatar Bakual
Bakual - comment - 3 Feb 2020

@infograf768 That's not my task and I never said I'd do that.
It's exactly as @SharkyKZ wrotes, the template copy needs to take care of all assets (language files obviously included), not just simply copy the folder. If it properly reads and copies the assets, then the language file issue is solved as well.

avatar Quy
Quy - comment - 25 Apr 2020

Duplicate #28796?

avatar infograf768
infograf768 - comment - 26 Apr 2020

#28796 is mainly aimed at copying site template but we started there to discuss solutions.

We do not get anymore the issue with Service as stated by @SharkyKZ as it has been added to the xml.

But we still get the issue with the specific js files in media/templates/atum/js/

Cassiopea has no js files but one can imagine 3rd party templates may have some also in media.

and evidently the language files for which we get
JInstaller: :Install: File does not exist /Applications/MAMP/htdocs/testinstall/joomla40/tmp/template_copy_5ea51c4e22eff/en-GB/en-GB.tpl_atum2.ini

Let me add this comment to #28796 and see what @Bakual says about keeping one or the other.

avatar Bakual
Bakual - comment - 26 Apr 2020

Please test #28813

avatar Quy Quy - change - 26 Apr 2020
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2020-04-26 14:04:29
Closed_By Quy
avatar Quy Quy - close - 26 Apr 2020
avatar wilsonge wilsonge - change - 16 Sep 2020
Labels Removed: ?
avatar wilsonge wilsonge - unlabeled - 16 Sep 2020

Add a Comment

Login with GitHub to post a comment