User tests: Successful: Unsuccessful:
Pull Request for Issue # .
Nobody asked for this.
.php
file, not a .sql
fileTurn on debugging. Expect the debug console to work the same as it does without the patch.
Turn on logging (in the plugin settings). 'Deprecated' and 'Everything' logs should now be stored in different files for each site/option/view/layout. Sql Query log files should end in .php
because (without some specific server settings) .sql
files could be shown to anyone who knows how to find them and may contain sensitive information that should not be made public.
Probably not?
I realize this is kind of a strange PR. Maybe nobody thinks there's much use in using layouts for this when the plugin alone is already working just fine. There are a few good reasons maybe. For one, it greatly reduces the amount of code in the main plugin file making what remains a lot easier to comprehend. Also, it has the benefit that layouts always have which is that they can be easily overridden. Maybe overriding the debug console is not a big priority for most people but I think there can be some good reasons to do so.
I also think there are several things about this plugin worth examining in more detail. One is the way sql logs are written and overwritten. Another is the question of whether it's appropriate for this plugin to be configure log files at all.
Anyway, I don't expect this to be merged right away but let's discuss it a bit and see what else can be improved.
Status | New | ⇒ | Pending |
Category | ⇒ | Layout Front End Plugins |
Labels |
Added:
?
|
Looks like some nice new stuff was added since I started all this. Should be integrated now.
You have to fix code styles. Click on the red "X" above in list of commits and next on the "Details". Then click on the red test on the next page.
Direct link: https://travis-ci.org/joomla/joomla-cms/jobs/193430713 and scroll down.
@okonomiyaki3000 @csthomas i have reviewed the files from a CS perspective. I hope i have fixed the most errors. We just need to wait for travis to check it again than i can come back to fix them too
If you have more time then you can fix year 2016 to 2017
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
Good to know:)
@okonomiyaki3000 is green now.
So it looks like there are still some issues with that PR
Also, we see text changes (Profile Information
=> Profile
) but I don't remember making changes to the language files. So I'm kind of curious how that happened.
The point i have is that after the PR some tabs are gone (e.g log messages)
Certainly. But, in your unapplied example, do those tabs actually contain any information? I guess not. The patched version omits unnecessary tabs.
Ah, I see. You might have thought that turning on logging in the plugin settings' "Logging" tab would make log messages appear in the debug console. This is not correct. It's a confusing (and I think kind of stupid) thing about this plugin. The "Logging" tab has absolutely nothing to do with the output in the debug console. Switching those logs on causes log files to be written. If you want logs to show in the debug console itself, the settings are in the "Plugin" tab.
Actually, I really think the options in the "Logging" tab are bad. First of all, they are confusing because you think of this plugin as being associated with the debug console, not log files. Second, the options here are kind of limited and strange. If you really cared about logging, you'd want more flexible options that this. Basically, I think there should be a plugin devoted to log configuration which should give a lot better control over this stuff. Weirdest and worst of all, "Log Executed Queries" writes a file with a .sql
instead of .php
extension meaning that your web server will most likely serve it as-is to anyone who can guess the path. Since it contains a bunch of queries, it's not hard to imagine that some information may be in there that you didn't want to share with the public. Also, unlike normal log files, these sql logs get overwritten completely instead of appended to. Ah, and (for some reason) the queries in these files have all instances of backtick removed (which could be a problem for several reasons). This PR does change the file extension of the sql log to .php
but I don't deal with the other issues.
Certainly. But, in your unapplied example, do those tabs actually contain any information? I guess not. The patched version omits unnecessary tabs.
They not contain everytime info but i have produced some errors and the tabs are there but not correct see:
To reproduce the errors replace this file: /administrator/language/en-GB/en-GB.com_cpanel.ini
with:
; Joomla! Project
; Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8
COM_CPANEL="Control Panel"
COM_CPANEL_HEADER_SUBMENU=Submenu"
And go to the com_postinstall backend view.
This produces a parsing error (missing " before Submenu) and a missing string error as the most of the postinstall language strings for the messages are missing.
After this patch the parsing error is not detected and the missing string view looks strange m<be there is just a div missing or similiar.
This is all good now, right? Any other issues?
I would test it if you fix conflict.
hmm i'm confused.
this is before and after the patch:
it looks like the ordering is different?
; Joomla! Project
; Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8
; Common boolean values
; Note: YES, NO, TRUE, FALSE are reserved words in INI format.
; Keep this string on top
JERROR_PARSING_LANGUAGE_FILE=" : error(s) in line(s) %s"
J1=1"
J2="2"
J3="3"
OK, I'll try to look into it soon.
After rebasing with the latest staging, I couldn't duplicate the issue. If it still exists, let me know.
I tested it at J3.7.2 and this PR has a few issues. I created a mistake in language file administrator/language/en-GB/en-GB.ini
to see parsing error log.
95 Queries Logged instead in old version 32 Queries Logged
Real queries are 32.
There are PHP Notices on lines in database queries:
30.
**Query Time: 0.47 ms** **After last query: 0.47 ms** **Query memory: 0.033 MB Memory before query: 3.113 MB** **Rows returned: 20**
SELECT m.id, m.title, m.alias, m.link, m.parent_id, m.img, e.element, m.menutype
FROM j37_menu AS m
INNER JOIN j37_extensions AS e
ON m.component_id = e.extension_id
WHERE m.menutype = 'main'
AND m.client_id = 1
AND m.id > 1
AND e.enabled = 1
ORDER BY m.lft
**Explain**
Notice: Undefined index: Duration in /.../layouts/plugins/system/debug/tabletohtml.php on line 20
Notice: Undefined index: Duration in /.../layouts/plugins/system/debug/tabletohtml.php on line 20
# JROOT/libraries/cms/html/html.php
#JROOT/libraries/cms/html/html.php
The memory usage is better
Can you fix conflict and fix above problems? I would like to see this PR merged in Joomla 3.
Ping, @okonomiyaki3000 do you find a little time to resolve the conflict and check my above comment?
I've started working on this but it will take some time to integrate the changes.
How do you do? Any news?
How about if I close this PR for now and maybe put in a different one later after taking some time to figure out what needs to be done?
OK, but please do not delete your branch okonomiyaki3000:render-debug-with-layouts
.
Should we consider this superseded by #20380 ?
Yeah, seems like it.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-22 23:53:09 |
Closed_By | ⇒ | okonomiyaki3000 |
OK...so in serious need of a rebase here. Not today though.