Jump to content

Tracy Debugger


adrian

Recommended Posts

13 minutes ago, adrian said:

There is one outstanding one on his local Windows dev setup that I can't reproduce at all and he also isn't seeing on a live server. He is getting session_start / headers already sent error.

After testing on a few more local sites I can't reproduce the error, so must be something specific to that one site and nothing to bother with.

But one new issue I noticed is that it seems Adminer expects its root url to always include a query string. So in the Tracy implementation it can form invalid URLs that lead to a 404. For example, the link back to the database view:

2018-11-01_140253.png.1bf4838d28996bed0f1b2b7326889449.png

  • Like 1
Link to comment
Share on other sites

5 minutes ago, adrian said:

Quick note to let you know that it's also possible to run Adminer directly via: /processwire/setup/adminer/ which may be preferable if you have lots of work to do and want it open in a more "permanent" way. At the moment I set the page as hidden so it actually won't appear under the Setup menu - I can change this, or perhaps I can have a link from the Adminer Tracy panel to open it this way. Any thoughts on which would be best?

I think it would be good to add this - I'd use it. Either option would be okay, but my preference would be to see Adminer in the Setup menu.

  • Like 1
Link to comment
Share on other sites

7 minutes ago, Robin S said:

but my preference would be to see Adminer in the Setup menu.

Done, although just realized I should tweak this so that the PW menu system is retained - coming soon ?

 

10 minutes ago, Robin S said:

But one new issue I noticed is that it seems Adminer expects its root url to always include a query string.

I'll look into this shortly.

Link to comment
Share on other sites

35 minutes ago, adrian said:

There is one outstanding one on his local Windows dev setup that I can't reproduce at all and he also isn't seeing on a live server. He is getting session_start / headers already sent error. 

Could someone else on Windows (maybe @bernhard) take a look and let me know if you have the same problem as well.

Seeing the warning here as well. Tested on Win 10. Will try tomorrow on Win 7 but I don't think there will be a difference. Issue seems to be session_use_cookies, whether 0 or 1 and/or not ob_start() and ob_flush() at the very top and very end respectively...

Edited by kongondo
  • Like 2
Link to comment
Share on other sites

23 minutes ago, adrian said:

Done, although just realized I should tweak this so that the PW menu system is retained - coming soon

Personally I'd rather open Adminer in a new tab and have the whole screen dedicated to it. Is there a way you could make it configurable whether to have the PW menu or not? Or perhaps there could just be a small link back to the PW admin root?

  • Like 1
Link to comment
Share on other sites

52 minutes ago, Robin S said:

But one new issue I noticed is that it seems Adminer expects its root url to always include a query string.

I have this fixed in the Adminer panel version, but struggling to get it sorted in the Setup > Adminer version. Not sure I'll get this sorted tonight before I leave I'm afraid.

34 minutes ago, Robin S said:

Personally I'd rather open Adminer in a new tab and have the whole screen dedicated to it.

I'll just leave it this way for now then - will tweak when I am back if needed.

  • Like 2
Link to comment
Share on other sites

3 minutes ago, adrian said:

@kongondo and @Robin S - can you please try the attached version to see if that fixes those errors on Windows please?

 

ProcessTracyAdminer.module

Sorry, still doesn't work.

 

Quote

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at ....\site\modules\TracyDebugger\panels\Adminer\adminer-4.6.3-mysql.php:151) in .....\site\modules\TracyDebugger\panels\Adminer\adminer-4.6.3-mysql.php on line 71

 

Link to comment
Share on other sites

I'm on the road now so can't help much but interesting @bernhard isn't having issues. Also weird that the file is referencing itself regarding the headers sent stuff. That said I can't see it being a core Adminer issue either. Hopefully you guys can help to figure it out for me ?

Link to comment
Share on other sites

@adrian when you get back, please take into account $config->dbPort setting. I'm using non-standard port and this should be honored in ProcessTracyAdminer.module something like that:

$port = wire('config')->dbPort ? ':'.wire('config')->dbPort : '';
...
new AdminerProcessWireLogin(wire('config')->dbHost.$port, wire('config')->dbUser, wire('config')->dbPass, wire('config')->dbName),

 

  • Like 1
Link to comment
Share on other sites

13 hours ago, kongondo said:

I can confirm same warning  on Win 7.

I think I might have found the source of this issue. It seems to relate to debug mode in /site/config.php. When debug mode is on I get the session warning and when it is off I don't. Can you confirm @kongondo?

20 hours ago, adrian said:

I have this fixed in the Adminer panel version

@adrian, this fix isn't working reliably for me. If I visit the "MySQL" root item in the breadcrumbs, then browse into a database table, then click the database name in the breadcrumbs I get a 404. I wonder if the simplest thing might be to reverse your previous fix and make a small modification to adminer-4.6.3-mysql.php: on line 531 change "&db=" to "?db=". Seems to work well here for both the Process module and the panel.

BTW, the adminer-4.6.3-mysql.php file is pretty horrible. I get why the project owner wants to compile everything into one file but it results in some weird encoding (PhpStorm gives encoding warnings when the file is opened and is liable to auto-save the file and mess it up in the process) and it's very difficult to debug. Do you think it would be feasible at all to do a custom compilation of the source to make it a bit more readable and leave out the lzw compression? 

  • Like 2
Link to comment
Share on other sites

26 minutes ago, adrian said:

Would someone (maybe @Robin S) mind putting together a PR with his suggested fix for the &db issue and if you wouldn't mind also @matjazp's request for a custom port.

Done.

23 minutes ago, adrian said:

Also do you have any ideas on how to get around the debug mode issue?

Not sure, but I wonder if it's related to the PHP notices from Adminer & plugins I mentioned earlier in our PM conversation. Maybe with debug mode on the error reporting level changes and those notices are being output somewhere before session start.

  • Like 2
Link to comment
Share on other sites

No idea, but maybe these informations are helpful: I'm using SessionDbHandler, error reporting E_ALL, laragon, win10; no warnings, no errors;

I think it would be great to have the PW logo besides the Adminer logo so that one can go back to the PW admin if one uses the adminer process module from Setup > Adminer (which I prefer).

Edit:

<a href="/admin/" style="float:  left;">
<img src="/wire/modules/AdminTheme/AdminThemeUikit/uikit/custom/images/pw-mark.png" alt="Back to ProcessWire" style="
  height: 22px;
  margin: 5px;
  margin-right: 5px;
  margin-left: 10px;
">
</a>

BzYBtpP.png

And on smaller screens:

8kJvDeb.png

Does anybody know how to inject that into <div id="menu"> ? Maybe some hints @adrian then I can do a PR - just don't know where to inject it properly ?

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...