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:
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.
Labels |
Added:
?
|
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!
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()
.
JPatch::clean() was the answer I look for. Thank you!
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-02-18 13:13:41 |
Closed_By | ⇒ | zero-24 |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-02-18 13:13:40 |
Closing as we have a RTC PR here: http://issues.joomla.org/tracker/joomla-cms/6118
Set to "closed" on behalf of @zero-24 by The JTracker Application at issues.joomla.org/joomla-cms/6111
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.