Jump to content
adrian

Tracy Debugger

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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
22 minutes ago, adrian said:

Not sure I'll get this sorted tonight before I leave I'm afraid.

No worries. Big thanks for adding Adminer to Tracy and enjoy your time away.

  • Like 3

Share this post


Link to post
Share on other sites
7 hours ago, kongondo said:

Will try tomorrow on Win 7 but I don't think there will be a difference

I can confirm same warning  on Win 7.

  • Like 1

Share this post


Link to post
Share on other sites

And it is really messing up the interface...I'll try and Google the issue when if I get a moment..

Share this post


Link to post
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

 

Share this post


Link to post
Share on other sites

I just installed the version from github and I don't see any errors on chrome/win10... Let me know if I can help with debugging.

Share this post


Link to post
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 😊

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
46 minutes ago, Robin S said:

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?

Spot on!

  • Like 1

Share this post


Link to post
Share on other sites

Thanks everyone for the debugging. 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. I can easily merge a PR on my phone but not keen on coding ☺

Share this post


Link to post
Share on other sites

PS - I'll take a look at the possibility of custom compiling when I'm back. Also do you have any ideas on how to get around the debug mode issue? 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks for the PR. Maybe we need to get those plugins cleaned up. I'll take a look when I can unless you beat me to it☺

Share this post


Link to post
Share on other sites

@Robin S - I wonder if a simple temporary solution might be to turn off error reporting at the top of the Adminer process module file?

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, adrian said:

I wonder if a simple temporary solution might be to turn off error reporting at the top of the Adminer process module file?

Yep, works well here. New PR made.

  • Like 1

Share this post


Link to post
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 🙂

Share this post


Link to post
Share on other sites

@bernhard - there is a name () method from Adminer which I think will handle this. Only catch might be not wanting it in the panel version? 

Share this post


Link to post
Share on other sites
7 hours ago, Robin S said:

Yep, works well here. New PR made.

Thanks @Robin S PR merged and modules directory updated. 

  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By gebeer
      Although the PW backend is really intuitive, ever so often my clients need some assistance. Be it they are not so tech savvy or they are not working in the backend often.
      For those cases it is nice to make some help videos available to editors. This is what this module does.
      ProcessHelpVideos Module
      A Process module to display help videos for the ProcessWire CMS. It can be used to make help videos (screencasts) available to content editors.
      This module adds a 'Help Videos" section to the ProcessWire backend. The help videos are accessible through an automatically created page in the Admin page tree. You can add your help videos as pages in the page tree. The module adds a hidden page to the page tree that acts as parent page for the help video pages. All necessary fields and templates will be installed automatically. If there are already a CKEditor field and/or a file field for mp4 files installed in the system, the module will use those. Otherwise it will create the necessary fields. Also the necessary templates for the parent help videos page and it's children are created on module install. The module installs a permission process-helpvideos. Every user role that should have access to the help video section, needs this permission. I use the help video approach on quite a few production sites. It is stable so far and well received by site owners/editors. Up until now I installed required fields, templates and pages manually and then added the module. Now I added all this logic to the install method of the module and it should be ready to share.
      The module and further description on how to use it is available on github: https://github.com/gebeer/ProcessHelpVideos
      If you like to give it a try, I am happy to receive your comments/suggestions here.
    • By Robin S
      A module created in response to the topic here:
      Page List Select Multiple Quickly
      Modifies PageListSelectMultiple to allow you to select multiple pages without the tree closing every time you select a page.
      The screencast says it all:

       
      https://github.com/Toutouwai/PageListSelectMultipleQuickly
      https://modules.processwire.com/modules/page-list-select-multiple-quickly/
    • By gebeer
      Hello all,
      sharing my new module FieldtypeImagePicker. It provides a configurable input field for choosing any type of image from a predefined folder.
      The need for it came up because a client had a custom SVG icon set and I wanted the editors to be able to choose an icon in the page editor.
      It can also be used to offer a choice of images that are used site-wide without having to upload them to individual pages.
      There are no image manipulation methods like with the native PW image field.
      Module and full description can be found on github https://github.com/gebeer/FieldtypeImagePicker
      Kudos to @Martijn Geerts. I used his module FieldTypeSelectFile as a base to build upon.
      Here's how the input field looks like in the page editor:

      Hope it can be of use to someone.
      If you like to give it a try, I'm happy to hear your comments or suggestions for improvement. Eventually this will go in the module directory soon, too.
    • By bernhard
      @Sergio asked about the pdf creation process in the showcase thread about my 360° feedback/survey tool and so I went ahead and set my little pdf helper module to public.
      Description from PW Weekly:
       
      Modules Directory: https://modules.processwire.com/modules/rock-pdf/
      Download & Docs: https://github.com/BernhardBaumrock/RockPDF
       
      You can combine it easily with RockReplacer: 
      See also a little showcase of the RockPdf module in this thread:
       
    • By ukyo
      FieldtypeFontIconPicker
      Supported Icon Libraries
      FontAwesome 4.7.0 Uikit 3.0.34 IonicIcons 2.0.1 Cahangelog
      NOTE: Module store data without prefix, you need to add "prefix" when you want to show your icon on front-end, because some of front-end frameworks using font-awesome with different "prefix".
      Module will search site/modules/**/configs/IconPicker.*.php and site/templates/IconPicker.*.php paths for FieldtypeFontIconPicker config files.
      All config files need to return a PHP ARRAY like examples.
      Example config file : create your own icon set.
      File location is site/configs/IconPicker.example.php
      <?php namespace ProcessWire; /** * IconPicker : Custom Icons */ return [ "name" => "my-custom-icons", "title" => "My Custom Icon Set", "version" => "1.0.0", "styles" => array( wire("config")->urls->templates . "dist/css/my-custom-icons.css" ), "scripts" => array( wire("config")->urls->templates . "dist/js/my-custom-icons.js" ), "categorized" => true, "attributes" => array(), "icons" => array( "brand-icons" => array( "title" => "Brand Icons", "icons" => array( "google", "facebook", "twitter", "instagram" ) ), "flag-icons" => array( "title" => "Flag Icons", "icons" => array( "tr", "gb", "us", "it", "de", "nl", "fr" ) ) ) ]; Example config file : use existing and extend it.
      File location is site/configs/IconPicker.altivebir.php
      <?php namespace ProcessWire; /** * IconPicker : Existing & Extend */ $resource = include wire("config")->paths->siteModules . "FieldtypeFontIconPicker/configs/IconPicker.uikit.php"; $url = wire("config")->urls->templates . "dist"; $resource["scripts"] = array_merge($resource["scripts"], ["{$url}/js/Altivebir.Icon.min.js"]); $resource["icons"]["flag-icons"] = [ "title" => "Flag Icons", "icons" => array("tr", "en", "fr", "us", "it", "de") ]; $resource["icons"]["brand-icons"]["icons"] = array_merge($resource["icons"]["brand-icons"]["icons"], array( "altivebir" )); return $resource; After you add your custom config file, you will see your config file on library select box. Library Title (Location Folder Name).

      If your library categorized and if you have categorized icons set like uikit and fontawesome libraries, you will have category limitation options per icon field or leave it empty for allow all categories (default).

      Example : output
      if ($icon = $page->get("iconField")) { echo "<i class='prefix-{$icon}' />"; } MarkupFontIconPicker Usage
      // MarkupFontIconPicker::render(YourIconField=string, Options=array) echo MarkupFontIconPicker::render($page->YourIconField, [ 'prefix' => 'uk-icon-', // Icon class prefix, if you have different prefix, default is : "fa fa-" 'tag' => 'span', // Icon tag default is : "i" 'class' => 'fa-lg', // If you have extra cutom classes, for example : icons sizes, Array or Sting value 'style' => 'your custom styles if you have' // Array or String Value ]); Theme support

      Search support

      Category support

       
×
×
  • Create New...