Jump to content
adrian

Tracy Debugger

Recommended Posts

Yes, I thought about passing the Validator entirely to JavaScript. There could be even an "on demand" mode that validates only on clicking on the panel (just an idea).

Apart from the issue I had on one server Tracy loads fast here. I have PHP 7 on most servers and sometimes I get 200-250 ms speed, at least that's what Tracy shows. When I revert PHP version to 5.4 or 5.6, speed increases to 500 and 700 ms. I have to add that I use only a few panels.

  • Like 2

Share this post


Link to post
Share on other sites

There could be even an "on demand" mode that validates only on clicking on the panel (just an idea).

If we keep the Validator panel off and enable it temporarily with the Once option, we get a similar - though not exactly the same - effect, if I'm not mistaken. When we decide to use it more than once, now we can just choose Sticky.  When you switch to Sticky, you do not have to click anywhere anymore just to validate the page once more. To me it looks like a good workflow. An on-demand validation would stay on-demand, but what if we are in a long session of fixing some validation issues? In that case we would need another option to switch between on-demand and automatic in order to save some time and clicks.

Another issue:

The Once and Sticky button features might need some additional polish: currently there is no way to tell apart Sticky and the standard default state, after a while we cannot remember the reason why those checkboxes are on or off. Some sort of color coding might be good to implement to solve this. Say, green is used to indicate the temporary Sticky state. Or maybe an icon (::after selector probably?) An icon is more descriptive, so probably a better solution.

  • Like 1

Share this post


Link to post
Share on other sites

If we keep the Validator panel off and enable it temporarily with the Once option, we get a similar - though not exactly the same - effect, if I'm not mistaken. When we decide to use it more than once, now we can just choose Sticky.  When you switch to Sticky, you do not have to click anywhere anymore just to validate the page once more. To me it looks like a good workflow. An on-demand validation would stay on-demand, but what if we are in a long session of fixing some validation issues? In that case we would need another option to switch between on-demand and automatic in order to save some time and clicks.

I think I mostly agree with you here - the downside to the current option is that requires a page reload (when you click Once or Sticky) to load the Validator panel. An AJAX option would be much quicker - you could have the panel always loaded with no content and a button to trigger the validation request. I am not really sure how much this really matters though - if you decide to do a "Once" validation and you see errors, you'll probably then "Sticky" it until you have things fixed, then "Reset". I think in the end I probably agree with you and won't worry about changing things at the moment :)

Another issue:

The Once and Sticky button features might need some additional polish: currently there is no way to tell apart Sticky and the standard default state, after a while we cannot remember the reason why those checkboxes are on or off. Some sort of color coding might be good to implement to solve this. Say, green is used to indicate the temporary Sticky state. Or maybe an icon (::after selector probably?) An icon is more descriptive, so probably a better solution.

This sounds useful - I am thinking just one icon positioned after each of the default panels so you know what is the set that is defined in the main module config settings. 

I would actually like your thoughts on the current behaviour regarding making some "Sticky" changes and then adding an additional panel "Once" - currently any time you do a "Once" it clears the previous "Sticky" options which I don't think it very helpful or expected. I think I will change this so that on the next reload, the states is restored to the last sticky state, rather than the default state - sound ok?

  • Like 1

Share this post


Link to post
Share on other sites

I would actually like your thoughts on the current behaviour regarding making some "Sticky" changes and then adding an additional panel "Once"...

Additional panel? Well, we already have quite a few of them. Isn't it possible to manage all this in the current panel? Maybe I'm missing something, but it would also be a bit confusing to manage related panels. Currently all panels are completely unrelated, which is probably the expected behavior.

...currently any time you do a "Once" it clears the previous "Sticky" options which I don't think it very helpful or expected. I think I will change this so that on the next reload, the states is restored to the last sticky state, rather than the default state - sound ok?

Sounds OK! Once we can tell those states apart, we will also be able to visualize it :D

Share this post


Link to post
Share on other sites

Additional panel? Well, we already have quite a few of them. Isn't it possible to manage all this in the current panel? Maybe I'm missing something, but it would also be a bit confusing to manage related panels. Currently all panels are completely unrelated, which is probably the expected behavior.

Sorry - poor wording on my part - I am talking about enabling an extra panel (or disabling one) using the "Once" option - hopefully that sentence makes more sense like that :)

Share this post


Link to post
Share on other sites

Aha, sorry! So it was part of the same line of thinking and I should not have separated it. "Enabling" is probaly a better word in this context, but I'm just an English learner... :)

Share this post


Link to post
Share on other sites
but I'm just an English learner

You Europeans make me smile - your English is probably better than mine :)

Latest version comes with a few general tweaks/fixes, but the most significant are related to the Selector panel based on our recent discussions.

It now returns to the "Sticky" state when you reload after a "Once" change (previously, it returned to default from the config settings).

There are also now icons indicating if:

  • the panel is set in the default list in the module config settings ("Tick" icon),
  • the state of the panel is different for the current view, ie you have made a "Once" change (number "1" icon)

In the following example, you can see that:

  • Debug Mode is disabled. Default is enabled (checkbox icon). There is no "1" icon so it is a Sticky setting.
  • ProcesswireInfo is disabled. Default is enabled (checkbox icon), There is a "1" icon so you know it's a "Once" only setting.
  • Validator is enabled. Default is disabled (no checkbox icon). There is a "1" icon so you know it's a "Once" only setting. 

post-985-0-77227200-1462826153_thumb.png

Hope that all makes sense and provides a quick visual of what the current panel settings are and what they will be when the page is reloaded.

  • Like 2

Share this post


Link to post
Share on other sites

 your English is probably better than mine

Well I guess you have no idea how much effort is put  even in simpler replies if you're not a native English speaker :)

  • Like 5

Share this post


Link to post
Share on other sites

Well I guess you have no idea how much effort is put  even in simpler replies if you're not a native English speaker :)

Sorry if that came across the wrong way - I am just always in awe of how great you guys are at being multilingual. It was meant to be a compliment!

I know a little travel Spanish and it seems so hard to get beyond that.

I also remember a teenage German asking me questions about English grammar and I didn't know the answer - I think unfortunately those of us who are from English speaking countries typically don't get the same grounding in languages and their rules - we just know what sounds right without knowing why. That's why in some ways you probably do have a better grasp of English and how it works. And it's such a bastard language with all these weird exceptions to rules - I don't know how anyone ever learns it!

  • Like 2

Share this post


Link to post
Share on other sites

I was just trying to be funny here that's why the smiley. But it's true that it's often hard to put things right, especially because a wrong wording or term can easily modify the meaning.

Otoh you "natives" :) seem to have a good sense for understanding malformed posts :)

  • Like 2

Share this post


Link to post
Share on other sites

A big thumbs up! You did it again Adrian! :)
One teeny-weeny question though: can we have some color coding for the icons please? :P You see, they are rather small (we want to save space, so it is expected), however the tick mark is just a thin line, the number one is also "just a thin tick mark" transformed a little bit, so my I eyes+brain are a bit stretched to their limits when differentiating them.

Speaking of languages: do not expect me to know too much about Hungarian grammar either... When we (try to) learn a language from books, we are forced to learn some grammar too, however, when growing up with it, we do not need to elaborate too much on the inner workings, so only a few of us do so. BTW: if you have the time, you can speed up your learning process by using this: http://ankisrs.net (you might have already tested it, I am currently in the process of building my very first German cards.)

  • Like 1

Share this post


Link to post
Share on other sites

A big thumbs up! You did it again Adrian! :)

One teeny-weeny question though: can we have some color coding for the icons please? :P You see, they are rather small (we want to save space, so it is expected), however the tick mark is just a thin line, the number one is also "just a thin tick mark" transformed a little bit, so my I eyes+brain are a bit stretched to their limits when differentiating them.

Happy to help make this easier to see, but firstly I am wondering if what you are seeing on your setup matches the screenshot above, or if it's different - perhaps there is some CSS at play again that is altering them? If they are the same, perhaps you wouldn't mind playing with them till you're happy with how they look - would save us potentially going back and forward over several different versions. They are both SVG (https://github.com/adrianbj/TracyDebugger/blob/master/PanelSelectorPanel.inc#L124), so it will be easy for you to change the size and color.

Speaking of languages: do not expect me to know too much about Hungarian grammar either... When we (try to) learn a language from books, we are forced to learn some grammar too, however, when growing up with it, we do not need to elaborate too much on the inner workings, so only a few of us do so. BTW: if you have the time, you can speed up your learning process by using this: http://ankisrs.net (you might have already tested it, I am currently in the process of building my very first German cards.)

Thanks for the link - I hadn't seen that - looks pretty cool actually - I'll definitely give it a go.

  • Like 1

Share this post


Link to post
Share on other sites

Happy to help make this easier to see, but firstly I am wondering if what you are seeing on your setup matches the screenshot above, or if it's different - perhaps there is some CSS at play again that is altering them? If they are the same, perhaps you wouldn't mind playing with them till you're happy with how they look - would save us potentially going back and forward over several different versions. They are both SVG (https://github.com/adrianbj/TracyDebugger/blob/master/PanelSelectorPanel.inc#L124), so it will be easy for you to change the size and color.

I would just use fill="green" for Default, fill="orange" for Once (if you prefer the "PW magenta", why not...). I opened the panel in each of my three browsers (Chrome, Firefox and Safari) and it looks quite similar to yours:

post-4029-0-28949100-1462861987_thumb.gi

  • Like 1

Share this post


Link to post
Share on other sites

One more thing I forgot to ask: how can new "users" figure out the what these icons mean?

  • Like 1

Share this post


Link to post
Share on other sites

Thanks - I have made those changes. I also upped the size of the icons a couple of pixels which should also help a little.

One more thing I forgot to ask: how can new "users" figure out the what these icons mean?

I played around with adding a legend to the panel, but it just kind of looked messy and took up too much extra space, so I just added tooltips to the icons - hopefully this helps a little.

  • Like 2

Share this post


Link to post
Share on other sites

Hi, I have just checked it out. May I suggest changes to the <title>s?

Default panel from module config settings
to something like:
turned on in module's settings

"config settings" is sort of word repetition, PW labels the buttons in question "Settings" so it maybe enough. I also tried to use the same point of view in the case of both titles: why one option is turned on or off, so the messages are consistent.

Panel status changed once
to something like:
turned on "Once"
or maybe:
turned on by "Once"
?

I also tried to be short :)

The enlarged icons are a bit easier to recognize and probably about the largest in size we can use. Thank you!

  • Like 1

Share this post


Link to post
Share on other sites

Thanks - I changed them to be close to what you suggested.

The latest version also add the generation times for each panel to the selector panel so you can quickly see if one is very slow.

I have also included some CSS tweaks and some other small bug fixes that I discovered with the validator and users panel.

  • Like 1

Share this post


Link to post
Share on other sites

Just saw that the Validator panel is also loaded in the admin, perhaps it's not really needed there.

Share this post


Link to post
Share on other sites

Just saw that the Validator panel is also loaded in the admin, perhaps it's not really needed there.

It shouldn't be: https://github.com/adrianbj/TracyDebugger/blob/master/TracyDebugger.module#L263

Any ideas why that check is failing for you? 

The Validator and Variables panels are both supposed to be disabled in the admin and are for me.

There are however showing checked in the Selector Panel - working on that now. Actually not sure I can do much about this - don't want to maintain separate cookies for frontend and admin and if it's unchecked when in the admin and you click once or sticky, it would make that change for the frontend as well. I don't think this is a big deal so will leave for the moment.

Share this post


Link to post
Share on other sites

False alarm: I had version 1.3.8. After update it's all fine.

For me showing these checked on Selector Panel is no problem. Though you could solve it by CSS, the admin has "template-admin" class on the body, e.g. hide it.

Share this post


Link to post
Share on other sites

Another notice, hopefully more to the point :) When "Loggin in production mode" is on, Google PageSpeed (and others) report much worse speed scores. I get about 85 vs 95 on the site I'm currently working. This is logical but maybe this could be noted somewhere.

Share this post


Link to post
Share on other sites

Though you could solve it by CSS, the admin has "template-admin" class on the body, e.g. hide it.

Good idea - hiding it might be a decent option - I'll have a think about it.

Another notice, hopefully more to the point :) When "Loggin in production mode" is on, Google PageSpeed (and others) report much worse speed scores. I get about 85 vs 95 on the site I'm currently working. This is logical but maybe this could be noted somewhere.

I am surprised about this - I am not sure why unless you are using a browser extension. Surely with the online version of any of these tools they won't have any Debugger bar code loaded. Am I missing something obvious?

I can imagine that having Tracy running with "Allow Logging in Production Mode" enabled might make a very minor change to scores, but I would expect it to be insigificant.

  • Like 1

Share this post


Link to post
Share on other sites

Hi Adrian,

I'm trying to track down a mysterious issue that affects Tracy Debugger; i have a set of pages all using the same template, and there are a set of 5 of these pages that all exhibit the same problem, the tracy bar doesn't load and i get one of these errors:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 82 bytes) in /home/user/public_html/wire/core/Page.php on line 1611
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 130968 bytes) in /home/user/public_html/wire/core/Wire.php on line 1048

For all of the other 176 siblings, everything works fine...

This doesn't affect the live site at all, but there does seem to be something odd going on between tracy and these particular pages on the front end, as tracy loads fine on the PW page editor for these pages...

Share this post


Link to post
Share on other sites

Hey Macrura,

What version of TracyDebugger are you running? Also, does it make any difference if you switch from the master to stable version of the Tracy core (in the module config settings).

Also, what happens if you disable all the panels in the module settings. If it works with all panels disabled, please try enabling one at a time. I have a feeling it might be the PW Info panel - any chance you have a large Profields Table on these pages - I just came across an issue with this myself today - the PWInfo panel gets a LOT of data loaded in this situation. I need to figure out a way around this.

Thanks for helping to figure this out.

  • Like 1

Share this post


Link to post
Share on other sites

Hi Adrian, i tried both master and dev, and also tried disabling all panels, but the error persists either way;

These pages do have multiple tables, however the ones that exhibit the error are actually much less populated than some of the pages that have those tables populated.

The tables themselves are only 3-5 columns and max 10 rows.

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 eelkenet
      Hi! I've created a small Inputfield module called InputfieldFloatRange which allows you to use an HTML5 <input type="range" ../> slider as an InputField. I needed something like this for a project where the client needs to be able to tweak this value more based on 'a feeling' than just entering a boring old number. Maybe more people can use this so I'm hereby releasing it into the wild. 
      EDIT: You can now install it directly from the Modules directory: http://modules.processwire.com/modules/inputfield-float-range/
       
      What is it?
      The missing range slider Inputfield for Processwire. 
      What does it do?
      This module extends InputfieldFloat and allows you to use HTML5 range sliders for number fields in your templates.
      It includes a visible and editable value field, to override/tweak the value if required.  
      Features
      Min/max values Precision (number of decimals) Optional step value (Read more) Optional manual override of the selected value (will still adhere to the rules above) Configurable rounding of manually entered values (floor, round, ceil, disable) Usage
      Clone / zip repo Install FieldtypeFloatRange, this automatically installs the Inputfield Create new field of type `Float (range)` or convert an existing `Float`, `Integer` or `Text` field. To render the field's value simply echo `$page->field` Demo
      A field with Min=0, Max=1, Step=0.2, Precision=2

      Field with settings Min=0, Max=200, Step=0.25, Precision=2

       
      Todo
      Make the display-field's size configurable (will use the Input Size field setting)  Hopefully become redundant  
      Changelog
      005 (current version)
      - Fix bug where the Inputfield would not work properly within repeaters / repeater matrices
      004
      - Make rounding of manually entered values configurable (floor, round, ceil or disable)
      - Fix small JS bug when the value-display field was not displayed
      - Update README
      003
      - Code cleanup, add some ModuleInfo data & LICENSE
      - Submit to PW Modules directory (http://modules.processwire.com/modules/inputfield-float-range/)
      002
      - Fix issue where setting the step value to an empty value created problem with validation
      - Make the display-field optional
      001
      - Initial release
       
      Thanks!
       
       
    • By Gadgetto
      Status update links (inside this thread) for SnipWire development will be always posted here:
      2019-10-18
      2019-08-08
      2019-06-15
      2019-06-02
      2019-05-25
      If you are interested, you can test the current state of development:
      https://github.com/gadgetto/SnipWire
      Please note that the software is not yet intended for use in a production system (alpha version).
      If you like, you can also submit feature requests and suggestions for improvement. I also accept pull requests.
      ---- INITIAL POST FROM 2019-05-25 ----
      I wanted to let you know that I am currently working on a new ProcessWire module that fully integrates the Snipcart Shopping Cart System into ProcessWire. (this is a customer project, so I had to postpone the development of my other module GroupMailer).
      The new module SnipWire offers full integration of the Snipcart Shopping Cart System into ProcessWire.
      Here are some highlights:
      simple setup with (optional) pre-installed templates, product fields, sample products (quasi a complete shop system to get started immediately) store dashboard with all data from the snipcart system (no change to the snipcart dashboard itself required) Integrated REST API for controlling and querying snipcart data webhooks to trigger events from Snipcart (new order, new customer, etc.) multi currency support self-defined/configurable tax rates etc. Development is already well advanced and I plan to release the module in the next 2-3 months.
      I'm not sure yet if this will be a "Pro" module or if it will be made available for free.
      I would be grateful for suggestions and hints!
      (please have a look at the screenshots to get an idea what I'm talking about)
       




    • 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. Field widths entered into the Template Field Widths inputfield are only applied if the Edit Template form is submitted with the Template Field Widths inputfield in an opened state. "Collapsed" is the recommended setting if you think you might also use core inputs for setting field widths in a template context. 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 adrian
      This module allows you to automatically rename file (including image) uploads according to a configurable format
      This module lets you define as many rules as you need to determine how uploaded files will be named and you can have different rules for different pages, templates, fields, and file extensions, or one rule for all uploads. Renaming works for files uploaded via the admin interface and also via the API, including images added from remote URLs.   Github: https://github.com/adrianbj/CustomUploadNames
      Modules Directory: http://modules.processwire.com/modules/process-custom-upload-names/
      Renaming Rules
      The module config allows you to set an unlimited number of Rename Rules. You can define rules to specific fields, templates, pages, and file extensions. If a rule option is left blank, the rule with be applied to all fields/templates/pages/extensions. Leave Filename Format blank to prevent renaming for a specific field/template/page combo, overriding a more general rule. Rules are processed in order, so put more specific rules before more general ones. You can drag to change the order of rules as needed. The following variables can be used in the filename format: $page, $template, $field, and $file. For some of these (eg. $field->description), if they haven't been filled out and saved prior to uploading the image, renaming won't occur on upload, but will happen on page save (could be an issue if image has already been inserted into RTE/HTML field before page save). Some examples: $page->title mysite-{$template->name}-images $field->label $file->description {$page->name}-{$file->filesize}-kb prefix-[Y-m-d_H-i-s]-suffix (anything inside square brackets is is considered to be a PHP date format for the current date/time) randstring[n] (where n is the number of characters you want in the string) ### (custom number mask, eg. 001 if more than one image with same name on a page. This is an enhanced version of the automatic addition of numbers if required) If 'Rename on Save' is checked files will be renamed again each time a page is saved (admin or front-end via API). WARNING: this setting will break any direct links to the old filename, which is particularly relevant for images inserted into RTE/HTML fields. The Filename Format can be defined using plain text and PW $page variable, for example: mysite-{$page->path} You can preserve the uploaded filename for certain rules. This will allow you to set a general renaming rule for your entire site, but then add a rule for a specific page/template/field that does not rename the uploaded file. Just simply build the rule, but leave the Filename Format field empty. You can specify an optional character limit (to nearest whole word) for the length of the filename - useful if you are using $page->path, $path->name etc and have very long page names - eg. news articles, publication titles etc. NOTE - if you are using ProcessWire's webp features, be sure to use the useSrcExt because if you have jpg and png files on the same page and your rename rules result in the same name, you need to maintain the src extension so they are kept as separate files.
      $config->webpOptions = array(     'useSrcExt' => false, // Use source file extension in webp filename? (file.jpg.webp rather than file.webp) ); Acknowledgments
      The module config settings make use of code from Pete's EmailToPage module and the renaming function is based on this code from Ryan: http://processwire.com/talk/topic/3299-ability-to-define-convention-for-image-and-file-upload-names/?p=32623 (also see this post for his thoughts on file renaming and why it is the lazy way out - worth a read before deciding to use this module). 
       
       
      NOTE:
      This should not be needed on most sites, but I work with lots of sites that host PDFs and photos/vectors that are available for download and I have always renamed the files on upload because clients will often upload files with horrible meaningless filenames like:
      Final ReportV6 web version for John Feb 23.PDF

×
×
  • Create New...