?
avatar chetanmadaan
chetanmadaan
21 Mar 2019

Steps to reproduce the issue

  1. Install Joomla at localhost/beez3/
  2. Go to extensions >> Templates >> Templates
  3. Open beez3 template.
  4. Click copy template on top left.
  5. Put in any name in the popup.

Expected result

image
Template should be copied.

Actual result

image
Copy template fails.

System information (as much as possible)

Joomla 3.9.4
Windows 7 64 bit
Xampp
PHP 7.0
MySQL 5.6

Additional comments

The problem is specifically here:
https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_templates/models/template.php#L333

The str_replace function replaces the name of template wherever it exists in the path:

$file: D:\home\htdocs\beez3\tmp\template_copy_5c93fab14b898/language/en-GB/en-GB.tpl_beez3.ini
$newFile: D:\home\htdocs\testtemplate\tmp\template_copy_5c93fab14b898/language/en-GB/en-GB.tpl_testtemplate.ini
avatar chetanmadaan chetanmadaan - open - 21 Mar 2019
avatar joomla-cms-bot joomla-cms-bot - change - 21 Mar 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Mar 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Mar 2019
Status New Information Required
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Mar 2019

@HLeithner can you please comment?

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Mar 2019
Category com_templates
avatar HLeithner
HLeithner - comment - 22 Mar 2019

it's a bug and we should fix it. Maybe someone could write a PR for this.

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Mar 2019
Status Information Required Discussion
avatar joomla-cms-bot joomla-cms-bot - change - 23 Mar 2019
Closed_By Quy joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 23 Mar 2019
avatar Quy Quy - change - 23 Mar 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-03-23 16:25:02
Closed_By Quy
avatar joomla-cms-bot
joomla-cms-bot - comment - 23 Mar 2019

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/24295

avatar Quy
Quy - comment - 23 Mar 2019

Please test PR #24316


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24295.

Add a Comment

Login with GitHub to post a comment