? ? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
16 Aug 2017

when looking at the output with debug language the following output


**Loaded** : JROOT/language/en-GB/en-GB.mod_search.ini
**Loaded** : JROOT/language/en-GB/en-GB.mod_finder.ini
**Loaded** : JROOT/language/en-GB/en-GB.com_finder.ini
**Loaded** : JROOT\administrator/language/en-GB/en-GB.plg_content_finder.ini
**Loaded** : JROOT\administrator/language/en-GB/en-GB.plg_finder_categories.ini
**Loaded** : JROOT\administrator/language/en-GB/en-GB.plg_finder_contacts.ini

Note that the site files are in JROOT forward slash but the admin files are in JROOT backslash

This is on a windows system - it is fine on a linux system

Thanks @tonypartridge for the suggestion your code normalises the slash

@mbabker I couldnt get your JPath:clean method to work correctly

Pull Request for Issue #17510

avatar joomla-cms-bot joomla-cms-bot - change - 16 Aug 2017
Category Libraries
avatar brianteeman brianteeman - open - 16 Aug 2017
avatar brianteeman brianteeman - change - 16 Aug 2017
Status New Pending
avatar mbabker
mbabker - comment - 16 Aug 2017

Why wasn't JPath::clean() working? Fatal error or just not displaying right?

This basically hardcodes to always use /. Which isn't the worst issue, but in theory when displaying a filesystem path it'd be best to display things properly and that method should be doing that.

avatar brianteeman
brianteeman - comment - 16 Aug 2017

It was displaying the full server path. Maybe I did something wrong.

avatar mbabker
mbabker - comment - 16 Aug 2017

You'd still have to str_replace out JPATH_ROOT, JPath::clean() will basically only handle formatting things right.

avatar mbabker
mbabker - comment - 16 Aug 2017

Basically it should be this:

$link = str_replace(JPATH_ROOT, 'JROOT', JPath::clean($file));

If it's still showing the full path after that then JPATH_ROOT and the root path coming out of JPath::clean() don't agree on things.

avatar brianteeman
brianteeman - comment - 16 Aug 2017

Will test that soon.

avatar brianteeman
brianteeman - comment - 16 Aug 2017

with your code it changes all the slashes to
eg


**Loaded** : JROOT\language\en-GB\en-GB.com_finder.ini
**Loaded** : JROOT\administrator\language\en-GB\en-GB.plg_content_finder.ini

My code changed it to

**Loaded** : JROOT/language/en-GB/en-GB.com_finder.ini
**Loaded** : JROOT/administrator/language/en-GB/en-GB.plg_content_finder.ini

Not sure which is better but at least they both dont display the inconsistency in the original report. Please advise which you prefer?

avatar zero-24
zero-24 - comment - 16 Aug 2017

isn't that correct in windows envoirments?

avatar tonypartridge
tonypartridge - comment - 16 Aug 2017

His code is right given it’s a window the directory structure is backslash
natively. I’d go with @mbabkers change.

--
Tony Partridge

On 16 August 2017 at 13:10:43, Brian Teeman (notifications@github.com)
wrote:

with your code it changes all the slashes to
eg

Loaded : JROOT\language\en-GB\en-GB.com_finder.ini
Loaded : JROOT\administrator\language\en-GB\en-GB.plg_content_finder.ini

My code changed it to

Loaded : JROOT/language/en-GB/en-GB.com_finder.ini
Loaded : JROOT/administrator/language/en-GB/en-GB.plg_content_finder.ini

Not sure which is better but at least they both dont display the
inconsistency in the original report. Please advise which you prefer?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#17563 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABVglkiKd4T9KWbm1l2OGyT3PoIhFbO0ks5sYtxCgaJpZM4O4qFP
.

avatar mbabker
mbabker - comment - 16 Aug 2017

Personal preference is that when displaying filesystem paths it should use the native directory separator, so the first one would be what I'd prefer.

avatar brianteeman brianteeman - change - 16 Aug 2017
Labels Added: ?
avatar brianteeman
brianteeman - comment - 16 Aug 2017

Updated to @mbabker code

avatar zero-24 zero-24 - test_item - 16 Aug 2017 - Tested successfully
avatar zero-24
zero-24 - comment - 16 Aug 2017

I have tested this item successfully on 2e9f961

works good to me on windows now. Thanks


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

avatar lavipr lavipr - test_item - 21 Aug 2017 - Tested successfully
avatar lavipr
lavipr - comment - 21 Aug 2017

I have tested this item successfully on 2e9f961

Steps on Windows:
Enabled debug language and checked output of "Language Files Loaded" in backend and frontend.

Before patch:
Same "behaviour" of slashes as described in first post.

After patch:
Slashes are now consistently displayed (as backslashes).

Tested @icampus


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Aug 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 21 Aug 2017

RTC after two successful tests.

avatar mbabker mbabker - change - 21 Aug 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-08-21 11:52:43
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 21 Aug 2017
avatar mbabker mbabker - merge - 21 Aug 2017
avatar brianteeman
brianteeman - comment - 22 Aug 2017

Thanks

Add a Comment

Login with GitHub to post a comment