?
Referenced as Pull Request for: # 6118
avatar waader
waader
17 Feb 2015

I tried to create a module/component override in the template manager on an windows installation with the current staging branch. These are the errors I get:

joomla34_modul_override

The problem lies in administrator/components/com_templates/models/template.php at line 656

            $return = $this->createTemplateOverride($override . '/tmpl', $htmlPath);

respective Line 660

            $return = $this->createTemplateOverride($override . '/tmpl', $htmlPath);

When str_replace is invoked on Line 706

            $htmlFolder = $htmlPath . str_replace($overridePath, '', $folder);

one will get this - wrong - path as a result when using '/tmpl'
C:\Program Files (x86)\Ampps\www\joomla34\modules\mod_articles_category\tmpl/default.php

and this - right - path as a result when using DIRECTORY_SEPARATOR . 'tmpl'
/default.php

Should I change '/tmpl' to DIRECTORY_SEPARATOR . 'tmpl' or is there a better solution.

avatar waader waader - open - 17 Feb 2015
avatar joomla-cms-bot joomla-cms-bot - change - 17 Feb 2015
Labels Added: ?
avatar waader
waader - comment - 17 Feb 2015

I donĀ“t want to use the "Constant". All I say is that it solves the problem and as I know no better solution I ask for one.

avatar sovainfo
sovainfo - comment - 17 Feb 2015

This is the reason the introduction of DIRECTORY_SEPARATOR in paths needs to be reverted. It is going to break in many extensions. Any extension manipulating paths needs to cater for platform differences. Now, of course without DS, that was removed with J3!

avatar mbabker
mbabker - comment - 17 Feb 2015

I'd find it too coincidental if that change managed to break this function as everything in there was previously not using the JPATH_ constants, using DIRECTORY_SEPARATOR to break paths, and being standardized to the platform via JPath::clean().

avatar waader waader - reference | - 18 Feb 15
avatar waader
waader - comment - 18 Feb 2015

JPatch::clean() was the answer I look for. Thank you!

avatar zero-24 zero-24 - change - 18 Feb 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-02-18 13:13:41
Closed_By zero-24
avatar joomla-cms-bot joomla-cms-bot - change - 18 Feb 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-02-18 13:13:40
avatar joomla-cms-bot joomla-cms-bot - close - 18 Feb 2015
avatar joomla-cms-bot joomla-cms-bot - close - 18 Feb 2015
avatar zero-24
zero-24 - comment - 18 Feb 2015

Closing as we have a RTC PR here: http://issues.joomla.org/tracker/joomla-cms/6118


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6111.
avatar joomla-cms-bot
joomla-cms-bot - comment - 18 Feb 2015

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

Add a Comment

Login with GitHub to post a comment