? Pending

User tests: Successful: Unsuccessful:

avatar N6REJ
N6REJ
15 Sep 2019

Pull Request for Issue # .
#19048

Summary of Changes

cleans all template paths to ensure proper directory separator(s)
no extra '/' nor '' in path,

Testing Instructions

in the protostar css folder add
dummy.css & dummy2.css files ( empty is fine )
image

in the protostar js folder add dummy.js file ( empty is fine )
image

Modify protostar index.php as follows.


below
// Add template js
JHtml::_('script', 'template.js', array('version' => 'auto', 'relative' => true));

add
HTMLHelper::_('script', '/classes.js', array('version' => 'auto', 'relative' => true ));
HTMLHelper::_('script', '\/dummy.js', array('version' => 'auto', 'relative' => true ));
HTMLHelper::_('script', '\application.js', array('version' => 'auto', 'relative' => true ));

below
// Add Stylesheets
JHtml::_('stylesheet', 'template.css', array('version' => 'auto', 'relative' => true));

add
HTMLHelper::_('stylesheet', '/offline.css', array('version' => 'auto', 'relative' => true ));
HTMLHelper::_('stylesheet', '\/dummy.css', array('version' => 'auto', 'relative' => true ));
HTMLHelper::_('stylesheet', '\dummy2.css', array('version' => 'auto', 'relative' => true ));

it should look like this.
image

view frontend of site.
using code inspector or view source. It should match this image.
image

apply patch and retest.

Expected result

image
verify there are no backslashes ( \ ) nor double forward slashes ( / ) like before.

Actual result

image

Documentation Changes Required

none.

This will help insure platform universalness and was the reason for JPath::clean() being created to begin with.

avatar N6REJ N6REJ - open - 15 Sep 2019
avatar N6REJ N6REJ - change - 15 Sep 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Sep 2019
Category Libraries
avatar brianteeman
brianteeman - comment - 15 Sep 2019

Please provide a clear example that can be used to show the problem you are trying to solve.

avatar N6REJ N6REJ - change - 15 Sep 2019
Labels Added: ?
avatar N6REJ N6REJ - change - 15 Sep 2019
The description was changed
avatar N6REJ N6REJ - edited - 15 Sep 2019
avatar N6REJ
N6REJ - comment - 17 Sep 2019

@Quy thanks for being patient.

avatar viocassel viocassel - test_item - 17 Sep 2019 - Tested successfully
avatar viocassel
viocassel - comment - 17 Sep 2019

I have tested this item successfully on a25a6b7


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

avatar brianteeman
brianteeman - comment - 17 Sep 2019

I still think this is not correct. Its fixing a bug in the user not in the code.
ie you are not supposed to write the slash in your code

avatar N6REJ
N6REJ - comment - 17 Sep 2019

@brianteeman I don't disagree that it Shouldn't be necessary but does it do any harm or make things safer?

avatar brianteeman brianteeman - test_item - 17 Sep 2019 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 17 Sep 2019

I have tested this item ? unsuccessfully on 77db4f9


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

avatar brianteeman
brianteeman - comment - 17 Sep 2019

This fixes a cosmetic issue in the generated source code. it doesnt fix anything that affects the site
Adding the / or \ is simply a bug by the user but browsers are clever and they can cope

Why write code that has to be maintained if you dont need to?

PS I suspect that the reason you found this originally was because you did not have relative=true so /name.css was looking in the root


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

avatar N6REJ
N6REJ - comment - 17 Sep 2019

@brianteeman what was unsuccessful about your test?

avatar N6REJ N6REJ - change - 26 Jan 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-01-26 02:59:07
Closed_By N6REJ
avatar N6REJ N6REJ - close - 26 Jan 2020

Add a Comment

Login with GitHub to post a comment