? ? Pending

User tests: Successful: Unsuccessful:

avatar elkuku
elkuku
15 Sep 2018

Pull Request for Issue #22137 .

Summary of Changes

This will add an option to select a storage type for the debug plugin.

Currently only two options are supported:

  1. File - Debug information will be written to disk in json format.
  2. None

Testing Instructions

  1. Activate debug in global configuration
  2. Switch the storage type in plugin configuration and confirm that files are written - or not.

storage-setting

Expected result

Ability to Set the storage type to 'None'

Actual result

Files are always written - this might be a security issue.

Documentation Changes Required

Yes.
Add words to description of #20380 (TBD)

close #22137

avatar elkuku elkuku - open - 15 Sep 2018
avatar elkuku elkuku - change - 15 Sep 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Sep 2018
Category Administration Language & Strings Front End Plugins
avatar elkuku elkuku - change - 15 Sep 2018
Title
[4.0] Add option to select debug information storage method
[4.0] plg_system_debug - Add option to select debug information storage method
avatar elkuku elkuku - edited - 15 Sep 2018
avatar elkuku elkuku - change - 15 Sep 2018
Title
[4.0] plg_system_debug - Add option to select debug information storage method
[4.0] plg_system_debug - Add option to select storage method
avatar elkuku elkuku - edited - 15 Sep 2018
avatar elkuku elkuku - change - 15 Sep 2018
The description was changed
avatar elkuku elkuku - edited - 15 Sep 2018
avatar brianteeman
brianteeman - comment - 15 Sep 2018

why is this a new fieldset? Surely it belongs with logging?

avatar elkuku
elkuku - comment - 16 Sep 2018

I think we should separate this from logging.
I believe that 'file' is just the first option and others will follow with
additional settings. So the tab will get some more content...

Brian Teeman notifications@github.com schrieb am Sa., 15. Sep. 2018,
03:54:

why is this a new fieldset? Surely it belongs with logging?


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

avatar elkuku
elkuku - comment - 16 Sep 2018

Correct.
But I think the sentence is not quite right - the "where" doesn't sound
correct. @brianteeman ?

Quy notifications@github.com schrieb am Sa., 15. Sep. 2018, 22:36:

@Quy commented on this pull request.

In plugins/system/debug/debug.php
#22188 (comment):

@@ -600,4 +601,26 @@ private function collectLogs(): self

  return $this;

}
+

  • /**
    • Setup the storage method where debug information will be store (or not).

Change to stored


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#22188 (review),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACEukdee0T712o4gDBYzg8TUIMpMCZrks5ubcdEgaJpZM4WqMqR
.

avatar brianteeman
brianteeman - comment - 16 Sep 2018

Storage only refers to logging so it should be in the logging tab

avatar brianteeman
brianteeman - comment - 16 Sep 2018

It also makes no sense at all what the "storage" is referring to when it is on its own tab.

It needs to be on the logging tab AND only shown when logging is actually enabled

avatar elkuku
elkuku - comment - 17 Sep 2018

Back on my keyboard...
So, what I am trying to say is that

  • Logging refers basically to "Messages" that are generated by the system during execution, deprecated messages or messages by 3PD extensions.
    I believe activating this should not imply that those messages are going to be written to text files.
  • Storage refers to the way the whole "debug bar" data (like system info, session and request data, database queries and, well, the log messages) are handled.
      Current options include:
    • File
    • None
      Other possible options would be
    • Redis
    • PDO
    • A custom handler

So, in my humble opinion, this deserves two separated tabs.

On the other hand, if that doesn't make any sense to you, I would be willing, and able, to perform the required changes to get this merged so I can use my keyboard for writing code instead of comments ?

avatar brianteeman
brianteeman - comment - 17 Sep 2018

please make the requested changes - if the other stuff is ever written then the decision can always be reviewed at that time

avatar elkuku elkuku - change - 17 Sep 2018
Labels Added: ? ?
avatar elkuku
elkuku - comment - 17 Sep 2018

Done .

avatar joomla-cms-bot joomla-cms-bot - change - 17 Sep 2018
Category Administration Language & Strings Front End Plugins Administration Language & Strings Front End Plugins Templates (site)
avatar elkuku
elkuku - comment - 17 Sep 2018

Partially reverted...
If you think that the storage option doesn't deserve its own tab it should go to the general "Plugin" tab, because it has absolutely no connection to the log tab for the reasons stated above.

avatar joomla-cms-bot joomla-cms-bot - change - 17 Sep 2018
Category Administration Language & Strings Front End Plugins Templates (site) Administration Language & Strings Front End Plugins
avatar brianteeman
brianteeman - comment - 18 Sep 2018

I stick by my original comment

avatar mbabker
mbabker - comment - 18 Sep 2018

This isn't a logging configuration in the sense of dealing with log files, so IMO it's right that it does not go onto the logging tab.

avatar brianteeman
brianteeman - comment - 18 Sep 2018

what is it then? Maybe i have completely misunderstood it but from what I understand its purpose is to decide if log files are created

avatar mbabker
mbabker - comment - 18 Sep 2018

It's to configure whether the temporary files for a debugged request's data is stored basically, used in conjunction with the debug bar's Open Handler feature. It basically gives you the ability to review data for previous requests.

screen shot 2018-09-18 at 7 20 07 am

avatar mbabker
mbabker - comment - 18 Sep 2018

Well, when this option is fully integrated it wouldn't be "just" whether the data is stored but what backend storage is used (as hinted at earlier in this thread and in another issue).

avatar brianteeman
brianteeman - comment - 18 Sep 2018

Then the word storage is definitely misleading to me although now I see exactly what it is I see it is called storage in the code http://phpdebugbar.com/docs/storage.html

So if the field was called something like "storing collected data" or "collecting data storage" that would be less confusing perhaps?

avatar mbabker
mbabker - comment - 18 Sep 2018

"Collected Data Storage" should work.

avatar elkuku
elkuku - comment - 18 Sep 2018

Thank you very much.
Let's blame Mrs. Hamilton, my English teacher at school...
I also could have posted the link to the docs about storage, not sure why I omitted that - My fault.

avatar brianteeman
brianteeman - comment - 18 Sep 2018

Mrs Hamilton did a good job

avatar elkuku
elkuku - comment - 18 Sep 2018

OK since now we all know what we are talking about... I'd like to pollute my own PR with something a little OT..

I just tried to implement the open handler.
The following code:

# /components/com_content/Controller/DisplayController.php

public function xxx()
{
	$debugBar = new DebugBar();
	$debugBar->setStorage(new FileStorage($this->app->get('tmp_path')));

	$handler = new OpenHandler($debugBar);
	$handler->handle();
}

and

# /plugins/system/debug/debug.php:293

$debugBarRenderer
  ->setOpenHandlerUrl(JUri::root(true) . '/index.php?option=com_content&task=xxx&format=raw');

will enable the browsing of previous requests inside the debug bar which, IMHO, is a killer feature since it will enable the average developer for the first time to examine what happens during a redirect without the requirement for a single step debugger.

Now as you might have noticed the code is "hacked" into com_content which is obviously not the right place.
On the other hand I think that adding a new component (com_debug) to add this functionality would be an overkill...

Suggestions?

avatar mbabker
mbabker - comment - 18 Sep 2018

Add a view to com_admin.

avatar elkuku
elkuku - comment - 18 Sep 2018

And for the front end?
A simple controller task that returns a JSON response would be enough.
Or do we need some overriding strategy here?

Michael Babker notifications@github.com schrieb am Di., 18. Sep. 2018,
10:32:

Add a view to com_admin.


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

avatar elkuku
elkuku - comment - 20 Sep 2018

Add a view to com_admin.

I tried hard but I could not find a way to display anything from com_admin in frontend :(
Any hint how to accomplish this would be very much appreciated.

avatar elkuku
elkuku - comment - 24 Sep 2018

Not sure if we want to explore how to disable this great feature or are we good with the security enhancement that will be introduced by #22327 (which also includes the answer to my OT question here)?
So this could be closed.

avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Sep 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-09-25 05:01:23
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 25 Sep 2018
Closed_Date 2018-09-25 05:01:23 2018-09-25 05:01:24
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 25 Sep 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 25 Sep 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Sep 2018

Closed as stated above.


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

Add a Comment

Login with GitHub to post a comment