adrianbj / TracyDebugger

The ultimate debugging and development tool for ProcessWire
https://adrianbj.github.io/TracyDebugger/
GNU General Public License v2.0
88 stars 13 forks source link

Markup added even though template is set in "No Debug Bar" setting #78

Closed romaincazier closed 1 year ago

romaincazier commented 2 years ago

Hi,

When working on a module, I noticed that even though I disabled the template in the No debug bar in selected frontend templates, some markup was added right before </body>.

This is due to the line 1092. Best would be to check if the template is not in the list of excluded ones and return before any additions are made.

Let me know if you need more infos.

adrianbj commented 2 years ago

Hi @romaincazier - is there actually an issue with that output being rendered? That setting is only intended to prevent the debug bar from being shown, not to disable Tracy entirely. I may be able to refactor things to remove that output if needed, but I am curious if it's actually causing you any harm.

romaincazier commented 2 years ago

Not really, but in the case of my module the output is (mostly intended) for newsletters where script are usually forbidden / removed by email clients. What I don't know is if you can't be "downgraded" because you tried.

From what you’re saying my asking would involve more edits than just in the function I pointed to?

romaincazier commented 2 years ago

Actually since TracyDebugger is disabled in production it's okay, I was seeing this in my dev environment. I'll let you decide if it's worth it or not and you can close this issue.

Thanks!