User tests: Successful: Unsuccessful:
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
Category | ⇒ | Libraries |
Status | New | ⇒ | Pending |
It was displaying the full server path. Maybe I did something wrong.
You'd still have to str_replace out JPATH_ROOT
, JPath::clean() will basically only handle formatting things right.
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.
Will test that soon.
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?
isn't that correct in windows envoirments?
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
.
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.
Labels |
Added:
?
|
I have tested this item
works good to me on windows now. Thanks
I have tested this item
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
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
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:
?
|
Thanks
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.