Ivan Gretsky Posted December 6, 2021 Share Posted December 6, 2021 Good day, @adrian! I am debugging an Admin Action (yes, another module of your's)). I get an error and try to debug with bd(). I can see the Tracy bar and the dumps count appear. But then I hover the cart with dumps popup doesn't show. Actually no popups in the bar work. I get this message in the browser dev tools console: I also notice, that the Tracy code is added to the document twice: Why can that happen? Tracy seem to work as it should on other pages. Link to comment Share on other sites More sharing options...
adrian Posted December 6, 2021 Share Posted December 6, 2021 Can you share the Admin Action that is causing this? Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted December 6, 2021 Author Share Posted December 6, 2021 Just sent it in a PM. Link to comment Share on other sites More sharing options...
adrian Posted December 6, 2021 Share Posted December 6, 2021 Hi @Ivan Gretsky - thanks for the file. Unfortunately I can't reproduce yet. I thought perhaps you might have been bootstrapping PW into the action or something like that. Seeing Tracy loaded twice like that is definitely weird. Do you only see that with this action, or any Admin Action? Does it show up when loading the action, or only after running it? Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted December 6, 2021 Author Share Posted December 6, 2021 I am running this action just like any other. But it does end up with an error (which I am trying to debug) and a Bluescreen (Redscreen would be a better term here))). I do not see this on any other actions I run, though I didn't try to make them end with an error. I does show only when I am running it and get an error. Link to comment Share on other sites More sharing options...
Macrura Posted March 17, 2022 Share Posted March 17, 2022 I think the issue here is that Tracy is running 2x, and thus the JS error; For me this usually happens if i am doing an ajax call to an endpoint and that endpoint is still allowing Tracy to run; I couldn't stop tracy with an exit() like i was able to do in the past for some reason, so i had to disable the template in the module settings. Link to comment Share on other sites More sharing options...
adrian Posted March 17, 2022 Share Posted March 17, 2022 @Macrura - If this is something you can reproduce easily, would you mind seeing if adding: if(!Debugger::isEnabled()) at the start of this line (https://github.com/adrianbj/TracyDebugger/blob/24dcacfc864447a41676b0f12eeb901512c0d2eb/TracyDebugger.module.php#L1393) helps? If that doesn't work, then perhaps adding: if(Debugger::isEnabled()) return; at the top of the init() and ready() methods might work? Thanks a lot for testing these. See revised version below! Link to comment Share on other sites More sharing options...
adrian Posted March 21, 2022 Share Posted March 21, 2022 @Macrura and @Ivan Gretsky - I haven't seen the exact issue you are seeing, but I did have a site that pulls in data from another PW instance that wasn't showing the debug bar. I fixed it by adding: if(class_exists('\Tracy\Debugger') && Debugger::isEnabled()) return; as the first line in the module's init() method. I'd love if you could test that please and see if it helps your issues. Thanks, Adrian 1 Link to comment Share on other sites More sharing options...
Macrura Posted March 21, 2022 Share Posted March 21, 2022 Yes - will do asap - should be working on that site again today or tomorrow... Thanks!!! 2 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted March 21, 2022 Author Share Posted March 21, 2022 Sorry, don't have a chance to reproduce that. At least not quickly. Link to comment Share on other sites More sharing options...
adrian Posted March 24, 2022 Share Posted March 24, 2022 I've added that fix to the latest version - hopefully it works for your issue as well. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now