? Success

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
20 Jun 2016

Summary of Changes

Load files in the admin app by including the required classes to the autoloader.

Testing Instructions

The admin app should still function correctly.

avatar mbabker mbabker - open - 20 Jun 2016
avatar mbabker mbabker - change - 20 Jun 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Jun 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 20 Jun 2016
Category Administration
avatar pritalpatel pritalpatel - test_item - 2 Jul 2016 - Tested successfully
avatar pritalpatel
pritalpatel - comment - 2 Jul 2016

I have tested this item successfully on b7afe6c

I have tested it using automatic test suits which I have created to test content and user feature. All were successful after applying this patch. Created video for this tests here https://youtu.be/D4TKK4VUIHg

(Regarding testing instructions first I was confused by word "admin app" in testing info. But later I understand that it's mean to Joomla! Administrator tests)

Thanks.


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

avatar alikon alikon - test_item - 3 Jul 2016 - Tested successfully
avatar alikon
alikon - comment - 3 Jul 2016

I have tested this item successfully on b7afe6c

with this patch applyed for a couple of days the admin side still works as expected


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

avatar brianteeman brianteeman - change - 3 Jul 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 3 Jul 2016

rtc


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

avatar joomla-cms-bot joomla-cms-bot - change - 3 Jul 2016
Labels Added: ?
avatar joomla-cms-bot
joomla-cms-bot - comment - 17 Jul 2016

This PR has received new commits.

CC: @alikon, @pritalpatel

avatar infograf768
infograf768 - comment - 17 Jul 2016

@mbabker
looks like a typo for com_menus
com_media instead of com_menus for the loader

avatar mbabker
mbabker - comment - 17 Jul 2016

Fixed. Copy/Paste errors suck.

avatar infograf768
infograf768 - comment - 18 Jul 2016

@mbabker
I am also curious: why use DIR in some cases and full path in others?
Shall we not use all over the fullpath?

avatar mbabker
mbabker - comment - 18 Jul 2016

The DIR constant is an absolute path, specifically to the directory the
file is located in. IMO it's more readable to use it as able (mostly when
the path being loaded is the same level or under the file referencing it).

On Monday, July 18, 2016, infograf768 notifications@github.com wrote:

@mbabker https://github.com/mbabker
I am also curious: why use DIR in some cases and full path in others?
Shall we not use all over the fullpath?


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

avatar ggppdk
ggppdk - comment - 18 Jul 2016

@mbabker

The DIR constant is an absolute path, specifically to the directory the file is located in.

yes about "absolute path" , it is

but the benefit of it is that you don't need to care much about what is exactly this absolute path is,
it helps avoiding the hardcoding of component name
e.g.
/components/com_installer/

  • effectively behaving as relative paths are used

the argument , if same folder or parent folder, then we use it __ DIR __, but if parent - parent folder we don't use , sounds strange to me

avatar mbabker
mbabker - comment - 18 Jul 2016

It's a personal preference and AFAIK there is no style rule regarding how paths should be referenced. I'd suggest either absolute paths using __DIR__ or one of the JPATH_ constants referencing an application root, but I personally dislike require __DIR__ . '/../../folder/file.php' structures and avoid using them. As for when I use JPATH_ or __DIR__ it really boils down to where the file in question lies in the filesystem more than anything; I don't see the need to write out the full path if I'm including a file in either the same directory or a subdirectory from the file I'm in.

If we're going to nitpick over this stuff, I'll just close my autoloader PRs. I'm also not a fan of PRs getting held up because people want to try and apply arbitrary standards to them.

avatar infograf768 infograf768 - test_item - 18 Jul 2016 - Tested successfully
avatar infograf768
infograf768 - comment - 18 Jul 2016

I have tested this item successfully on ec8218c


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

avatar mbabker
mbabker - comment - 18 Jul 2016

Also, before I end ranting, a benefit to using absolute paths versus relative is you don't have to change the include reference if you move the file. If I move the file calling require __DIR__ . '/../../folder/file.php' to another directory, I have to update the reference (OK, same goes for anything using __DIR__ honestly; using JPATH_ avoids that completely but IMO it's unnecessary overkill sometimes).

avatar infograf768
infograf768 - comment - 18 Jul 2016

anyhow, this works fine here and solves the issue we had with the gsoc project.
@andrepereiradasilva can you test again so that we get this in staging?

avatar andrepereiradasilva andrepereiradasilva - test_item - 18 Jul 2016 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 18 Jul 2016

I have tested this item successfully on ec8218c

on code review


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

avatar ggppdk
ggppdk - comment - 18 Jul 2016

Also, before I end ranting, a benefit to using absolute paths versus relative is you don't have to change the include reference if you move the file. If I move the file calling require DIR . '/../../folder/file.php' to another directory, I have to update the reference (OK, same goes for anything using DIR honestly; using JPATH_ avoids that completely but IMO it's unnecessary overkill sometimes).

@mbabker
Agreed that is why i prefer to use JPATH too

  • easier to copy or move the code
  • easier to read (for me)

I'm also not a fan of PRs getting held up because people want to try and apply arbitrary standards to them.

and i hope that you don't imply that i am preventing a good PR, i was just asking, i had said the paths are good.

avatar mbabker
mbabker - comment - 18 Jul 2016

Not trying to imply anything at all, sorry if it comes across that way. Just seen a lot more than I'd like lately folks requesting changes to PRs simply because they're already editing the lines they'd like to see changed.

avatar wilsonge wilsonge - close - 18 Jul 2016
avatar wilsonge wilsonge - merge - 18 Jul 2016
avatar joomla-cms-bot joomla-cms-bot - close - 18 Jul 2016
avatar wilsonge wilsonge - change - 18 Jul 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-07-18 20:34:59
Closed_By wilsonge
avatar joomla-cms-bot joomla-cms-bot - change - 18 Jul 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment