User tests: Successful: Unsuccessful:
Pull Request for Issue # .
#19048
cleans all template paths to ensure proper directory separator(s)
no extra '/' nor '' in path,
in the protostar css folder add
dummy.css & dummy2.css files ( empty is fine )
in the protostar js folder add dummy.js file ( empty is fine )
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 ));
view frontend of site.
using code inspector or view source. It should match this image.
apply patch and retest.
verify there are no backslashes ( \ ) nor double forward slashes ( / ) like before.
none.
This will help insure platform universalness and was the reason for JPath::clean() being created to begin with.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
I have tested this item
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
@brianteeman I don't disagree that it Shouldn't be necessary but does it do any harm or make things safer?
I have tested this item
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
@brianteeman what was unsuccessful about your test?
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-01-26 02:59:07 |
Closed_By | ⇒ | N6REJ |
Please provide a clear example that can be used to show the problem you are trying to solve.