adrian

Tracy Debugger

Recommended Posts

29 minutes ago, tpr said:

There are lot more elements in Reno, including the sidebar and many header elements. Setting #wrap { z-index: 0 } also solves the panel issue but still the panels are above menus.

Is there any reason the nav items in Reno have such a high z-index:

@media only screen and (min-width: 960px)
html.AdminThemeReno.headSticky:not(.modal) #masthead {
    width: 100%;
    z-index: 100060;
}

If I put that (and some others) below 100 the Tracy panels seem fine - am I missing something?

  • Like 1

Share this post


Link to post
Share on other sites
32 minutes ago, tpr said:

but still the panels are above menus.

Is that such a big issue? If it was possible to turn off the "auto-expand" feature of Tracy (so that it only moves and resizes when adjusted by the mouse) then I could avoid one overlapping the other, right? I prefer Tracy having the highest z-index.

Share this post


Link to post
Share on other sites
2 minutes ago, szabesz said:

I prefer Tracy having the highest z-index.

You can always set the panel z-index value in the Tracy settings to something higher than 100060, but I would like to know still if those header elements need to be that high in the Reno sticky header.

  • Like 1

Share this post


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

You can always set the panel z-index value in the Tracy settings to something higher than 100060,

Oh yes, thanks, I forgot that... BTW, is there any reason it is called zIndex in the settings? I used the browser's find tool with z-index to no avail :) The settings page is so loooong that normally I navigate by searching.

Share this post


Link to post
Share on other sites
27 minutes ago, szabesz said:

is there any reason it is called zIndex in the settings?

Just because initially I had to set this with JS which uses zIndex, rather than z-index. I have just changed it locally and it will appear in the next commit.

  • Like 1

Share this post


Link to post
Share on other sites

Hi, i run into problems trying to dump stuff inside a hook attached by a module. Any idea what I am doing wrong?

	public function init()
	{
		// act on invite request
		wire('forms')->addHookBefore('FormBuilderProcessor::processInput', $this, 'processRequestIcfAccess');
	}



	public function processRequestIcfAccess(HookEvent $event)
	{
		// grab the data
		$church = $form->get('church_relation')->value;
		\TD::dump($church);
	}

Fatal error: Uncaught Error: Class 'TD' not found in /home/ubuntu/workspace/www/site/modules/IcfModules/IcfProcessInviteRequest.module:115 Stack

Share this post


Link to post
Share on other sites

I guess Tracy is not loaded when your init fires. You can try to attach your hook in ready() instead of init(). Sidenote: You should also be able to use the d() shortcut method without the Tracy class ;)

  • Like 1

Share this post


Link to post
Share on other sites

Hi @noelboss - as @bernhard noted Tracy isn't loaded yet. I try to load everything as early as possible but I don't have any control over the order in which modules are loaded, so when you make a dump call in init() it's a matter of luck really. Usually I find it works, but occasionally not.

Also, if you are debugging in a method like that, you will most likely want bd() / barDump(), rather than d() / dump() so that the output is to the debug bar, rather than inline.

  • Like 2

Share this post


Link to post
Share on other sites

I'm not sure if this is tracy related or not.

How do you disable the notification requests?

url ?Notifications=update&time=1524147545

The header shows x-tracy-ajax.

This fills and scrolls the console/network pane making it difficult to refer back.

Share this post


Link to post
Share on other sites

Hi @rick

Those come from the Notifications module (PW core but not installed by default). Personally I really dislike that module and never use it. I don't see a reason to poll the server every 20 seconds for notifications.

Tracy should not be loaded with those calls though - I exclude them here: https://github.com/adrianbj/TracyDebugger/blob/204db7e404312dc24e8ca39db445e7cfcc9ddd1a/TracyDebugger.module#L309 but I am wondering if maybe the 

if(isset($_SERVER['REQUEST_URI'])) {

or one of the other conditions just above is not working as expected on your system. This doesn't prevent those annoying entries in the browser dev console, but it should prevent Tracy from being loaded on each request. The x-tracy-ajax header you are seeing makes me wonder if those checks aren't working for you. Could you please take a look and let me know what is happening in the block of code?

Share this post


Link to post
Share on other sites

Absolutely! I'll take a look in in a bit when I get back.

I'll also get rid of that notifications module. The only reason I enabled it was I didn't like all the default messages scrolling the content off the screen. I figured notifications would be less intrusive/aggravating/cumbersome?

 

Share this post


Link to post
Share on other sites
7 minutes ago, rick said:

The only reason I enabled it was I didn't like all the default messages scrolling the content off the screen.

The UiKit theme collapses notifications by default which is much nicer.

Share this post


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

The UiKit theme collapses notifications by default which is much nicer.

I hadn't noticed. I don't use that theme because of the poor ui, but that is a different story. :)

I disabled the system notification and this issue no longer exists. So this wasn't related to tracy at all, but thanks for your help.

  • Like 1

Share this post


Link to post
Share on other sites
Just now, rick said:

So this wasn't related to tracy at all

The entries in the Network tab aren't due to Tracy, but I was curious about the Tracy header which I don't believe should be there. Oh well, something for another time I guess.

 

Share this post


Link to post
Share on other sites

There was no data associated with  x-tracy-header that I could see (just an empty entry), and it is no longer present since disabling the system notifications.

 

Share this post


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

I don't see a reason to poll the server every 20 seconds for notifications.

Concurrent page editing? At least it notifies the user, and often even me :P 

4 hours ago, rick said:

I didn't like all the default messages scrolling the content off the screen.

AOS has a sticky header option which fixes it. Thanks a lot @tpr !

  • Like 2

Share this post


Link to post
Share on other sites
3 minutes ago, szabesz said:

Concurrent page editing? At least it notifies the user, and often even me

Didn't think about that. I use Soma's PageEditSoftLock for that. It also polls regularly, only in ProcessPageEdit, not all the time. Also, in general I just find the Notifications UI/UX really annoying and it's also frustratingly difficult to uninstall, but if others like it, then that's why we have options :)

  • Like 2

Share this post


Link to post
Share on other sites

@adrian could you please add an option for the todo-panel to also scan /site/assets ? I always put my files for field configs there (runtime markup, rockgrid etc) so it would be great to have that files scanned as well. Thank you :)

Share this post


Link to post
Share on other sites
53 minutes ago, bernhard said:

@adrian could you please add an option for the todo-panel to also scan /site/assets ? I always put my files for field configs there (runtime markup, rockgrid etc) so it would be great to have that files scanned as well. Thank you :)

No time to test well, but let me know how it goes. Note that you really want to pay attention to the note suggestion adding files, cache, logs, sessions etc to the ignored dirs. Even then it's still a little slow. 

What do you think of the attached version?

TracyDebugger.zip

Share this post


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

No time to test well, but let me know how it goes. Note that you really want to pay attention to the note suggestion adding files, cache, logs, sessions etc to the ignored dirs. Even then it's still a little slow. 

Same here, no time to test it right now, but what do you think of adding a field just like the exclude field but for manual INCLUDEs? Should be quite easy to implement, just pass the content of the field to a $files->find($dir) and scan that files.

You are absolutely right that scanning the caches and compiled files is nonsense. But I think it's not a good solution to have a checkbox for the assets folder and then you have to exclude all unnecessary files... in my case I could just add /site/assets/RockGrid to my field and would have the todos show up in the tracy bar :) 

Share this post


Link to post
Share on other sites
Posted (edited)

Hi @adrian, I'm experiencing an issue with Tracy in AdminThemeUikit (I don't remember it happening in AdminThemeDefault) where the debug bar forgets its position between page loads. I normally keep the debug bar at bottom right, but it forgets this and jumps up to the top left (sometimes other random locations too). It seems to be related to opening a modal window, with Tracy enabled for modals. See in the screencast below how after opening and closing the modal then reloading the page Tracy is now at the top left of the screen.

tracy.gif.cb395f437f7a83adc5220241b3981232.gif

Hopefully not too tricky to fix. If in fact it is tricky, I wouldn't mind an option that keeps the debug bar locked in the bottom right because personally I never move it from there.

Edit: it does happen in AdminThemeDefault also. Funny, because I always have Tracy enabled for modals and I don't remember this occurring before. Maybe a side-effect of a recent update to the module?

Edited by Robin S
Added note about AdminThemeDefault
  • Like 3

Share this post


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

I wouldn't mind an option that keeps the debug bar locked in the bottom right because personally I never move it from there.

same here. though I haven't noticed this issue yet.

  • Like 2

Share this post


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

I'm experiencing an issue with Tracy in AdminThemeUikit (I don't remember it happening in AdminThemeDefault) where the debug bar forgets its position between page loads.

 

I think that Adrian fixed that in the latest version of Tracy, if I remember correctly...

Share this post


Link to post
Share on other sites
15 minutes ago, matjazp said:

I think that Adrian fixed that in the latest version of Tracy, if I remember correctly...

That screencast is with the latest version (4.10.19).

  • Like 1

Share this post


Link to post
Share on other sites
5 hours ago, matjazp said:

I think that Adrian fixed that in the latest version of Tracy, if I remember correctly...

This is unfortunately a slightly different situation. Both however due to the change in the positioning of the bar's co-ordinates from bottom-right to top-left. I'll look for a fix shortly.

  • Like 1

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Robin S
      Another little admin helper module...
      Template Field Widths
      Adds a "Field widths" field to Edit Template that allows you to quickly set the widths of inputfields in the template.

      Why?
      When setting up a new template or trying out different field layouts I find it a bit slow and tedious to have to open each field individually in a modal just to set the width. This module speeds up the process.
      Installation
      Install the Template Field Widths module.
      Config options
      You can set the default presentation of the "Field widths" field to collapsed or open. You can choose Name or Label as the primary identifier shown for the field. The unchosen alternative will become the title attribute shown on hover. You can choose to show the original field width next to the template context field width.  
      https://github.com/Toutouwai/TemplateFieldWidths
      https://modules.processwire.com/modules/template-field-widths/
    • By horst
      Croppable Image 3
      for PW 3.0.20+
      Module Version 1.1.16
      Sponsored by http://dreikon.de/, many thanks Timo & Niko!
      You can get it in the modules directory!
      Please refer to the readme on github for instructions.
       
      -------------------------------------------------------------------------
       
      Updating from prior versions:
       
      Updating from Croppable Image 3 with versions prior to 1.1.7, please do this as a one time step:
      In the PW Admin, go to side -> modules -> new, use "install via ClassName" and use CroppableImage3 for the Module Class Name. This will update your existing CroppableImage3 module sub directory, even if it is called a new install. After that, the module will be recogniced by the PW updater module, what makes it a lot easier on further updates.
      -------------------------------------------------------------------------
       
      For updating from the legacy Thumbnail / CropImage to CroppableImage3 read on here.
       
      -------------------------------------------------------------------------
       
    • By MoritzLost
      UPDATE: I have published a stable version of this module!
      Discussion thread:
      Github: https://github.com/MoritzLost/TextformatterPageTitleLinks
      ---
      Hello there,
      I'm working on a tiny textformatter module that searches the text for titles of other pages on your site and creates hyperlinks to them. I'm not sure if something like this exists already, but I haven't found anything in the module directory, so I wrote my own solution 🙂
      It's not properly tested yet and is still missing some functionality I would like to implement, so at the moment it should be considered in BETA. Features include limiting the pages that will get searched by template, and adding a custom CSS class to the generated hyperlinks. As I'm writing this I noticed that it will probably include unpublished and hidden pages at the moment, so yeah ... it's still in development alright 😅
      You can download the module from Github:
      https://github.com/MoritzLost/TextformatterPageTitleLinks
      There's some more information in the readme as well.
      Anyway, let me know what you think! I'm happy about any feedback, possible improvements or ideas on how to improve the module. Cheers.
    • By blad
      Hi guys!
      I just uploaded a module to explore files based on elFinder. By default it will show the "Files" folder.
      Screenshots:

      Video:
       
      To do:
       More options To fix:
       The function of rotating or scaling an image fails  Image editors V 1.01 (view issue)
      Fixed the bug working with the Multi-Language support ( translation of folders ). Fixed the name of elfinder.en  Github:
      https://github.com/LuisSantiago/ProcessElFinder/
      I hope you like it.
    • By BitPoet
      I'm really in love with FormBuilder, but the one thing missing to match all my end users' expectations were repeatable field groups. Think repeaters, in ProcessWire terms. Our primary application of PW is our corporate intranet, so "lines" of fields are quite common in the forms I build. We have all kinds of request forms where the information for a varying number of colleagues needs to be entered (from meal order to flight booking request) and where it is simply impractical to send a form for each, and I don't want to clutter my forms with multiple instances of fields that may only get used ten percent of the time.
      That's why I started to build FormBuilderMultiplier (link to GitHub).
      What it does:
      Adds an option to make a regular Fieldgroup repeatable Lets you limit the number of instances of a Fieldgroup on the form Adds an "Add row" button the form that adds another instance of the Fieldgroup's fields Adds a counter suffix at the end of every affected field's label Stores the entered values just like regular fields Makes the entered values available in preview and email notifications Supports most text based fields, textareas and selects (really, I haven't had enough time to test all the available choices yet) What it doesn't do (yet):
      Support saving to ProcessWire pages (i.e. real Repeaters) I haven't tested all the validation stuff, Date/Time inputs etc. yet, but since I'm utterly swamped with other stuff at work, I didn't want to wait until I have it polished. Any feedback is welcome. There might also be some issues with different output frameworks that I haven't encountered yet. The forms I work with mostly use UIKit.
      Status:
      Still alpha, so test well before using it in the field.
      Known issues:
      When rows are added, the form's iframe needs to be resized, which isn't completely clean yet.
      How it works:
      The Fieldgroup settings are added through regular hooks, as is the logic that adds the necessary field copies for processing the form and displaying previews.
      "Multiplied" field instances are suffixed with _NUM, where NUM is an incremental integer starting from 1. So if you have add two fields named "surname" and "givenname" to a fieldgroup and check the "multiply" checkbox, the form will initially have "surname_1" and "givenname_1" field (I'm still considering changing that to make the risk to shoot oneself into the foot by having a regular "surname_1" field somewhere else in the form less likely).
      When a "row" is added, the first row is cloned through JS and the counter in the fields' IDs, names and "for" attributes as well as the counter in the label are incremented before appending the copies to the Fieldset container in the form.
      To keep backend and frontend in sync, a hidden field named [name of the fieldset]__multiplier_rows is added to the form. Both the backend and the frontend script use this to store and retrieve the number of "rows".
      ToDo:
      Naturally, add the option to store the data in real repeaters when saving to pages. Do a lot of testing (and likely fixing). Make a few things (like the "Add row" button label etc.) configurable in field(set) context. Add a smooth API to retrieve the multiplied values as WireArrays. The mandatory moving screenshot: