Debug tools is simply a suite of function and variable calls to provide a more useful report when filing a bug. The report provides php, server, user, browser, viewport and system settings to allow the person reporting the bug to provide detailed information to the person or team responsible for addressing the bug. Each section of the report is configurable to enable or disable. A block is provided as well as a admin link and permissions for finer control.
Dependencies:
dblog
browscap.ini will provide additional information if selected.
Debug Tools sandbox link:
click here
Git clone command -
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/roger.soper/2303945.git debug_tools
cd debug_tools
Drupal Core Version:
Drupal 7
Comments
Comment #1
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxrogersoper2303945git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
roger.soper commentedThank you for the review. I have corrected the pareview errors and warnings,
http://pareview.sh/pareview/httpgitdrupalorgsandboxrogersoper2303945git
Comment #3
roger.soper commentedSetting to needs review.
Comment #4
ayesh commentedHi Roger,
I think I'm the first human one reviewing the code, so before moving into the tech aspects, if you wouldn't mind, I would like to know the intention of this module.
Of course the "tools" suggests it gives some sort of power-user kind of tools to administer any hidden settings or such, but looking at the code, it's more of "info" module. Either way, I personally see a lot of uses of the module, specially for the clients will less technical knowledge but they still want to send a full report to their IT guy, and such.
Do you have any plans to allow other modules to expose some debug info to your module, and probably reuse the data exposed by other modules with hook_requirements?
I'm going through the module and adding my suggestions. They are not in any particular order though.
- in debug_tools_help, I see you have used filter_xss_admin AND check_plain(), which makes any HTML made through the filter_xss_admin filter gets changed to plain text. You only need either of them (check_plain, filter_xss, filter_xss_admin).
- In function debug_tools_admin(), you are using system_settings_form() function which adds a submit handler to save whatever values the form has generated, minus the security tokens the the Form API adds. Use of a prefix is just a tradition to not mess up with other variables; it will not remove the variables when you uninstall the module.
To remove the variables, usually we implement hook_uninstall in the MODULE.install file and remove the variables using a db_delete with a %LIKE query, and variable_del on each individual variables.
- I see you have email functionality in the module. Generally we use drupal_mail() function to send the email, so Drupal can route the emails obeying the configuration. API doc of drupal_mail() has a lot of information on how to send emails with drupal_mail(). Note that you need to implement a hook_mail() in order for drupal_mail() to work.
- Other than above, there are some minor standards problems that one might not really give much attention. When creating links, always use the l() function. It can take care of the base path, URL aliases, etc. Also, use the t() function whenever necessary. I see you have used it almost everywhere, but a few places are missing the t(). (Good job not using t() in the hook_menu() implementation, which in case you should not use it there).
Also, I would personally love a $SESSION and $_COOKIE viewer.
Good luck!
Comment #5
Michael Hodge Jr commentedI'm setting this back to needs work given Ayeshs comments.
Comment #6
roger.soper commentedThank you Ayeshs and Michael. To address your comments Ayeshs.
1) The name debug tools is more about the future on the module, integration with Jira, Teamworkpm etc and idea of using the module as a tool to provided the developers with information needed to be more effective during debug.
2) I think it would be very useful to expose the info to other modules and will go on my to do list.
3) Good point about the help hook, I will adjust.
4) The hook uninstall is also something I will address.
5) I will review the drupal_mail function as well.
6) Lastly the l() and t() funtions will get a review on my end.
Comment #7
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #8
josh.estep commentedChanges have been applied according to feedback on this page:
https://www.drupal.org/node/2316001
Thank you to those who recommended those changes.
Comment #9
nickdickinsonwildeComment #10
nickdickinsonwildeComment #11
nickdickinsonwildeh3>Automated Review
PAReview did see a few problems but quite minor; see the report
Manual Review
This review uses the Project Application Review Template.
I'll have to test this out but I think I'm likely to recommend it to my clients in the future once it is out of sandbox and easy for them to install.
Comment #12
ayesh commentedOn a slightly irrelevant question, why is this called Debug tools? This is actually providing information and not a tool per se. Do you plan to add any specific tools?
Comment #13
roger.soper commentedThe module was debated between debug tools and qa report. We settled on debug tools because the primary use case for us is to debug assigned issues that regular users didn't have the capabilities to provide detailed enough information to help the developers debug as quickly as possible. The team decided that because there are a number of options (tools) available in the module we would settle with debug tools. The idea is to eventually add in some drush integration to allow elevated users to run drush commands based on the information returned from the module. Hope that helps a little bit. We will get on the issues you found asap as well.
Comment #14
roger.soper commentedI have made all the adjustments noted above. I also added README.txt content. Please review at your connivence.
Comment #15
nickdickinsonwildeLooks good to me now - marked as RTBC
Works as advertised (though haven't tried browserscape.ini).
All errors identified above fixed.
I did find two very minor issues:
Comment #16
roger.soper commentedThanks for all the help, I did not see the function misspelling in the latest version or either of the other issues. What is the next step to promote this project live? I read here: https://www.drupal.org/node/1068952 but do not see that option.
Comment #17
nickdickinsonwildeNow you have to wait for someone with the appropriate permissions to review the application - step 4 in this list:
1. community members review application
2. resolve issues and back to 1
3. all issues resolved, mark as RTBC
4. review by core team member
5. if they think it looks okay, give you permission to promote it.
Comment #18
roger.soper commentedThanks for the process update.
Comment #19
kscheirerNon-blocking issues:
Thanks for your contribution, roger.soper!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #20
roger.soper commentedThank you so much kscheirer however I still don't see the ability on the project edit to promote the project. Is there something I may be missing? Thanks again for all the effort.
Comment #21
roger.soper commentedJust checking back in on the status of this application. It appears to be approved but I still can not promote the project.
Comment #22
klausido you see a "Promote" tag at https://www.drupal.org/node/2303945/edit ?
Comment #23
roger.soper commentedNo I do not: http://goo.gl/xo7QaK
Comment #24
klausiAh, you project is of type "Drupal.org project", but it should be of type "module". You need to delete that sandbox and create a new one of 'Module project' type. https://www.drupal.org/node/add/project-module
Comment #25
roger.soper commentedThanks sooooo much. I'll give that a try boss.
Comment #26
wuxiaogu commentedI think you'd better write like this: