Jump to content

Tracy Debugger


adrian

Recommended Posts

10 minutes ago, Macrura said:

Hopefully i set this up right – i created a new permission called tracy-debugger-superuser, then i created a new role called 'developer' and then added that permission to that role; so now only people with the developer role should be able to see the tracy debug bar (?)

I haven't set up that tracy-debugger-superuser yet - that was just an idea at this stage. What I am asking you is whether that approach would be best, or whether it would be better to go with a permission that could be added to certain superusers that limits the panels on their Debug bars.

I think the second option would give more flexibility - what do you think?

Link to comment
Share on other sites

1 hour ago, Macrura said:

right - ok thanks, sure - yes, a per-superuser permission is best, to limit the panels, or none at all (sorry for being dense, doing like 10 things at once here..)

 

Ok, check out the latest version. Any panels that are checked here won't be available to superusers (and other users with tracy permission) if they have the "tracy-restricted-panels" permission. Let me know if that works for your needs.

Screen Shot 2016-09-13 at 2.48.50 PM.png

  • Like 2
Link to comment
Share on other sites

that is really cool - hopefully others find it useful also; i was able to create a 'restricted' role with that permission, and add it to selected superadmins on the project, and now they have a much smaller, restricted set of tracy items – working great! thanks as always!:rolleyes:

  • Like 2
Link to comment
Share on other sites

3 minutes ago, Macrura said:

that is really cool - hopefully others find it useful also; i was able to create a 'restricted' role with that permission, and add it to selected superadmins on the project, and now they have a much smaller, restricted set of tracy items – working great! thanks as always!:rolleyes:

Sweet - glad you are finding it useful.

I am kinda keen on knowing what panels you use and what panels you restricted them to. 

I have actually been thinking about setting up a poll so I can find out what panels you guys are all using - would be helpful so I know which ones to focus on improving. I don't think this new version of the forums has the poll option though.

  • Like 1
Link to comment
Share on other sites

@adrian At the moment I do not have the time to test these new "tracy-restricted-panels" permission features, however, may I point out this "strange sounding" title?

Restricted User Disbled Panels (vs e.g. Disbled Restricted-user Panels ?)

English is far from being my mother tongue, nevertheless, if I understand it correctly, then we restrict users to a certain set of panels, and this set of panels can be configured via enabling/disabling them. So it is not the panels that are restricted but the users themselves, because they have restricted access. Or am I mistaken? Sorry for being picky on this one, but I just do not comprehend this title as it sounds ambiguous to me and my proposal is not the best either but I just coud not could up with a better one :)

  • Like 1
Link to comment
Share on other sites

4 hours ago, szabesz said:

@adrian At the moment I do not have the time to test these new "tracy-restricted-panels" permission features, however, may I point out this "strange sounding" title?

Restricted User Disbled Panels (vs e.g. Disbled Restricted-user Panels ?)

English is far from being my mother tongue, nevertheless, if I understand it correctly, then we restrict users to a certain set of panels, and this set of panels can be configured via enabling/disabling them. So it is not the panels that are restricted but the users themselves, because they have restricted access. Or am I mistaken? Sorry for being picky on this one, but I just do not comprehend this title as it sounds ambiguous to me and my proposal is not the best either but I just coud not could up with a better one :)

How about:

Disabled Panels for Restricted Users or Panels Disabled for Restricted Users

  • Like 1
Link to comment
Share on other sites

Hello adrian,

I have discovered a problem with the HTML-validator:

Screenshot_20.jpg

I always get this message if I try to validate a page. I use the latest PW(3.0.33) and the latest TracyDebugger. I have added this panel permantently and my pages are always reachable. Can you confirm this behaviour?

Best regards

Link to comment
Share on other sites

Hi @Juergen - I think what you have come across is a POST size limit on the validator.nu site. You can confirm this by entering:

bd(static::$pageHtml,'pageHTML', array('maxLength' => 1000000));

as the last line of this function: https://github.com/adrianbj/TracyDebugger/blob/master/TracyDebugger.module#L784

You may need the Dumps Recorder - I didn't check if the standard dumps panel retains this dump.

If you then copy and paste this into: https://validator.nu/ using the "Text Field" option. You'll likely get a "bad gateway" error. If so, then that is the issue, although I am not sure what to do about it at the moment - I don't know whether they recently changed that limit (I have asked here: https://github.com/validator/validator/issues/371) - I am also seeing it here depending on the size of DOM of my page - horst's ALIF module puts it over the limit for me.

As for the tracy-debug divs being shown when clicking the link, that is confusing and a little concerning as it looks like the validator is getting access to the Tracy debug bar, which is shouldn't have. Any chance you could let me know the URL of the site (PM if you want) so I can take a look at that?

 

  • Like 2
Link to comment
Share on other sites

Hello adrian,

thanks for your response. I am sure that it should be the limit. For testing the site with guest access I have adust my settings to show the toolbar also for non logged in users (especially for testing some features which are also reachable without being logged in). In this case you will reach the limit quite fast. I will turn this back and I will see how it behave. It is not a real problem.

As for the tracy-debub divs I can say that they were not validated in the panel. This behaviour is only by clicking the link directly.

I will test it for a while without showing the toolbar on frontend for non logged in users and post the result here afterwards.

Link to comment
Share on other sites

Hi @Juergen - please try the latest commit - I switched it from using validator.nu to validator.w3.org/nu/ and it seems to be fine now. They both use the same checker so hopefully everything will be fine. I have a feeling that this might be a bit of a moving target though, so if anyone ever comes across issues with it, let me know and I'll try to get it working again.

  • Like 2
Link to comment
Share on other sites

Just now, Juergen said:

Hi adrian,

it works now as expected!!!! :)  Thanks!!

Awesome!

It also seems like the w3.org version that we're now using is significantly faster - I was typically getting 750 to 1000ms times on the validator.nu service - now it's around 500ms.

  • Like 1
Link to comment
Share on other sites

Not sure yet, but note that it works fine in the Template Editor - just use the Test button / CTRL+Enter. 

Let me see if I can see out why the console is misbehaving with that. The console is ajax driven, whereas the template editor/tester isn't.

Link to comment
Share on other sites

I found it - the "++" is being lost, so it's processing:

echo $i  ;

hence the continuous loop!

 

Must be some encoding issue. I was url encoding, but I stopped doing that to fix another issue. I will revisit and see what I can do to fix.

Thanks for reporting.

  • Like 1
Link to comment
Share on other sites

Just now, bernhard said:

works! thank you. i hope it does not affect any other parts of tracy :)

The changes I made will only affect the console - it's just a matter of whether the encoding change breaks anything else. I checked the pageNameUTF8 sanitizer (because it was the issue that you had with that which resulted in the change that deleted "+" signs) and that still works great, so hopefully we are good :)

  • Like 2
Link to comment
Share on other sites

It has always been good practice to note any 3rd party modules that you are using when posting an issue/bug report for the PW core, but after seeing @ryan's recent note about issues: https://github.com/processwire/processwire/issues/8 - "Indicate any 3rd party modules that are installed.", I thought it might be helpful to make it easy to get a formatted list of installed modules that you can simply copy/paste into your issue report.

The latest version of Tracy includes an update to the ProcessWire Info panel that provides a new "Versions List" section that lists all modules and their version numbers in a textarea to make it easy to copy/paste. It also shows the PW, PHP, and MySQL versions.

Screen Shot 2016-09-22 at 11.01.07 AM.png

For those of you updating from an existing version of Tracy, you'll need to check this new panel section in the module config settings:

Screen Shot 2016-09-22 at 11.04.24 AM.png

  • Like 6
Link to comment
Share on other sites

  • adrian pinned and locked this topic
  • adrian unpinned and pinned this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...