adrian

Tracy Debugger

Recommended Posts

11 minutes ago, Macrura said:

sorry for my confusion, but didn't the P icon used to have a link to edit the page being viewed? I used to use this all the time to get from front end to backend edit page - was that link moved somewhere - the appearance of that P panel seems to have changed a lot.

Hi @Macrura - sorry for the confusion. I split the content of the PW Info panel into two panels - itself and the new Request Info panel. Discussion on this new panel starts here: https://processwire.com/talk/topic/12208-tracy-debugger/?do=findComment&comment=153033

You'll see that it has the page edit and template edit (if your code editor is configured for links) buttons at the bottom. 

The PW Info panel is now more about info and links for PW and the Request Info panel is about the current page/request.

Be sure to check out the new options for both these panels in the module config settings as well - lots of great new tools.

Let me know if you have any more questions about this.

Share this post


Link to post
Share on other sites

Small new feature that some of you may find useful. It is disabled by default so you will need to turn it on in the ProcessWire Info panel config settings section.

Goto Page By ID which is available in the PW Info panel:

 5a1d1db6c196b_ScreenShot2017-11-28at12_26_10AM.png.bf3af193d647cf04683e5f5c1646d7fb.png

It allows you to enter a page ID and click "View" or "Edit to be taken to the appropriate place. 

This was requested by a friend who is getting into PW development and I can see it being quite useful on sites where you reference key pages by ID in your template files and want quick access to view/edit them without browsing or typing a full URL, especially when you can't actually remember what pages they actually are :) 

  • Like 4

Share this post


Link to post
Share on other sites

Hello Adrian upgraded to the latest version and i didnt go well, i am unable to enable the plugin:

 

ProcessWire: ProcessModule: Unknown language

DEBUG MODE BACKTRACE ($config->debug == true):
#0 /var/www/html/wire/core/PagesLoader.php(813): ProcessWire\Languages->setLanguage(NULL)
#1 /var/www/html/wire/core/Pages.php(719): ProcessWire\PagesLoader->getPath(21, Array)
#2 /var/www/html/site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module(2662): ProcessWire\Pages->getPath('21')
#3 /var/www/html/wire/core/WireHooks.php(777): TracyDebugger->{closure}(Object(ProcessWire\HookEvent))
#4 /var/www/html/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Modules), 'saveModuleConfi...', Array)
#5 /var/www/html/wire/modules/Process/ProcessModule/ProcessModule.module(1309): ProcessWire\Wire->__call('saveModuleConfi...', Array)
#6 /var/www/html/wire/modules/Process/ProcessModule/ProcessModule.module(1136): ProcessWire\ProcessModule->renderEdit('TracyDebugger', Array)
#7 /var/www/html/wire/core/Wire.php(380): ProcessWire\ProcessModule->___executeEdit()
#8 /var/www/html/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___executeEdit', Array)
#9 /var/www/html/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessModule), 'executeEdit', Array)
#10 /var/www/html/wire/core/ProcessController.php(244): ProcessWire\Wire->__call('executeEdit', Array)
#11 /var/www/html/wire/core/Wire.php(380): ProcessWire\ProcessController->___execute()
#12 /var/www/html/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___execute', Array)
#13 /var/www/html/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessController), 'execute', Array)
#14 /var/www/html/wire/core/admin.php(113): ProcessWire\Wire->__call('execute', Array)
#15 /var/www/html/wire/modules/AdminTheme/AdminThemeReno/controller.php(13): require('/var/www/html/a...')
#16 /var/www/html/site/templates/admin.php(15): require('/var/www/html/a...')
#17 /var/www/html/wire/core/TemplateFile.php(268): require('/var/www/html/a...')
#18 /var/www/html/wire/core/Wire.php(380): ProcessWire\TemplateFile->___render()
#19 /var/www/html/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___render', Array)
#20 /var/www/html/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\TemplateFile), 'render', Array)
#21 /var/www/html/wire/modules/PageRender.module(514): ProcessWire\Wire->__call('render', Array)
#22 /var/www/html/wire/core/Wire.php(383): ProcessWire\PageRender->___renderPage(Object(ProcessWire\HookEvent))
#23 /var/www/html/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___renderPage', Array)
#24 /var/www/html/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\PageRender), 'renderPage', Array)
#25 /var/www/html/wire/core/WireHooks.php(782): ProcessWire\Wire->__call('renderPage', Array)
#26 /var/www/html/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Page), 'render', Array)
#27 /var/www/html/wire/modules/Process/ProcessPageView.module(205): ProcessWire\Wire->__call('render', Array)
#28 /var/www/html/wire/core/Wire.php(383): ProcessWire\ProcessPageView->___execute(true)
#29 /var/www/html/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___execute', Array)
#30 /var/www/html/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessPageView), 'execute', Array)
#31 /var/www/html/index.php(55): ProcessWire\Wire->__call('execute', Array)
#32 {main}
  • Like 1

Share this post


Link to post
Share on other sites
On 28.10.2017 at 8:30 PM, adrian said:

I have rebuilt the Dumps Recorder panel as well. You probably won't want this most of the time, so it is no longer enabled by default on new Tracy installs, so if you are upgrading, I recommend disabling the Dumps Recorder panel by default and just enabling via the Panel Selector as needed. It no longer has a "Preserve Dumps" option, because that is now it's only purpose, so when it is enabled, it will preserve all dumps across all page / ajax requests and reloads. You can click "Clear Dumps" whenever you want, and of course disabling it will also clear the recorded dumps.

hi adrian,

I hope i'm using tracy wrong in this case because the missing option is quite annoying for me. I'm debugging a lot via bd('mytest') calls in my project and when i reload i want to see all dumps based on that single reload most of the time. with the missing option i always have to clean the dump and then reload. if i dont clean the dump it gets messy and misleading sometimes (showing variable values from a previous pageload).

thanks for your help :)

Share this post


Link to post
Share on other sites

Hi @erikvanberkum - sorry for the trouble upgrading. I am wondering if you'd mind helping me debug this please?

Firstly, what version of PW and PHP are you running?

Could you please go into wire/core/PagesLoader.php and echo $languageID before line 813. It should return 0 and the if($languageID) condition on 813 should fail, but for some reason $languages->setLanguage($language); is being called with $language set to NULL, hence the error you are seeing.

It's almost like your version of PHP is treating if($languageID) as true, when it should be false if set to 0

If you can report on these things, hopefully we can figure out what is going wrong.

Share this post


Link to post
Share on other sites
1 minute ago, bernhard said:

hi adrian,

I hope i'm using tracy wrong in this case because the missing option is quite annoying for me. I'm debugging a lot via bd('mytest') calls in my project and when i reload i want to see all dumps based on that single reload most of the time. with the missing option i always have to clean the dump and then reload. if i dont clean the dump it gets messy and misleading sometimes (showing variable values from a previous pageload).

thanks for your help :)

Hey @bernhard - as I mentioned, I now leave the Dumps Recorder disabled by default and only enable it via the Panel Selector if I need it which is usually only if there are some weird redirects going on that Tracy is missing. The main Dumps panel is now my own version (not the Tracy core) so I can control how it looks and behaves, and also the way it stores consecutive ajax requests.

Does that make sense and work for you? I can bring back the "Preserve Dumps" option if it's really needed, but really the new "Preserve Dumps" approach is to enable the Dumps Recorder when needed and when not, just don't load it.

  • Like 2

Share this post


Link to post
Share on other sites

thanks adrian!

i didn't know that a dumps panel appears automatically when i do a " bd('test') " anywhere in my code. so i thought i have to activate the dumps recorder :)

great new feature :) (y) 

  • Like 1

Share this post


Link to post
Share on other sites

Some nice updates this morning for the Console and the Snippets Runner panels.

1) The code injection feature (the one that lets you run hooks etc at init, ready, and finished) now has better error handling. It will no longer inject code if it detects any type of error (previously it wasn't properly detecting 500 errors).

2) The Console panel now makes use of orange and red icon colors. The orange simply indicates that you are currently injecting code, and the red indicates that there is an error in your code and as such, nothing is being injected.

3) The Console panel now restores the last error to the results section on page load so if you missed the error when you clicked "Run" to register the code, you will see it again as a reminder of what needs fixing.

4) 500 errors in the Console and Snippet Runner panels now show the full error message - previously this had to be tracked down in the browser dev console's Network tab.

Hopefully these changes will be nice improvements to debugging code in the Console and Snippet Runner panels.

Let me know if you notice any problems.

Cheers!

PS I have been using the Console code injection feature for all my hook testing lately and really enjoying it.

  • Like 4

Share this post


Link to post
Share on other sites

Adrian

Upgraded from to 4.8.11 today but problem stays

i am running

PW 3.0.62 on PHP 7.0.22-0 on an ubuntu0.16.04.1

echo $languageID before line 813

returns a 0

i have a total of 4 languages installed on this instance. 

Any ideas for further investigation?

  • Like 1

Share this post


Link to post
Share on other sites

Thanks @erikvanberkum - well it is returning 0 as expected, but the first line in your error shows that setLanguage is still being called.

Could you please temporarily replace:

if($languageID) $languages->setLanguage($language);

with:

if($languageID) {
    echo 'test' . $language->name;
    //$languages->setLanguage($language);
}

and let me know what you get.

Share this post


Link to post
Share on other sites

Might sound a little insignificant to mention, but I have found myself using the GOTO Page ID feature a lot :) but it was annoying me that there was no way to open the View/Edit links in a new tabs. Well, now you can - just use your standard "new tab" shortcut: middle-click, right-click > new tab, CTRL+left-click, 3-finger click, etc - really handy!

  • Like 3

Share this post


Link to post
Share on other sites

@adrian 

Replacing this code makes it work again. Now I am able to enable and disable Tracey.

if($languageID) {
    echo 'test' . $language->name;
    //$languages->setLanguage($language);
}

I cant find the output from the echo test, language name. The default language in my installation is English.

I only have the error when i enable or disable the Tracey. When its enabled and I remove the above code it keep working properly.

 

  • Like 1

Share this post


Link to post
Share on other sites

@erikvanberkum 

I just tested on 3.0.60 (I didn't have easy access to 3.0.62 using the PW Version switcher :)) and I can actually reproduce the issue you are having.

Turns out it's a bug in the PW core in that version. Look at the difference between:

3.0.60

if($languages) $languages->setLanguage($language);

3.0.84

if($languageID) $languages->setLanguage($language);

I would recommend upgrading to 3.0.84 to fix the problem!

PS - in my experience, 3.0.84 is more stable than the current "stable" version.

  • Like 2

Share this post


Link to post
Share on other sites
On ‎28‎/‎11‎/‎2017 at 9:32 AM, adrian said:

It allows you to enter a page ID and click "View" or "Edit to be taken to the appropriate place. 

I haven't try this feature so far but the first idea that came to me was to have some kind of info about the page even without clicking on the buttons. How about an ajax loaded line showing the page title as you type, in the bottom of the panel? I think that would make the panel more versatile but of course it's only a nice-to-have kind of request :)

  • Like 1

Share this post


Link to post
Share on other sites
18 hours ago, tpr said:

How about an ajax loaded line showing the page title as you type, in the bottom of the panel?

Hi @tpr - thanks for your idea. I almost did that when building this feature the first time, but struggled to come up with the right UX. Been going around in circles for way too long on this and I am still not sure how it should look. 

I am attaching a version of Tracy that includes the admin ajax search feature embedded into the PW Info panel. It's rough in look, but it works and returns exactly the same results as the admin version. Please note that it actually only works in the backend of your site at the moment - some missing dependencies.

I know this is not really what you asked for, but I am wondering what the best combo would actually be. Would you guys make use of an ajax search? Would it make sense to combine the ID and page search into one feature? Do we want edit and view links for results searched by name, rather than ID. 

Anyway, I am happy to implement something here - just looking for feedback on what you guys would find useful.

TracyDebugger.zip

Share this post


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

Anyway, I am happy to implement something here - just looking for feedback on what you guys would find useful.

The attached version of TD doesn't offer anything extra compared to the built-in admin search so I don't regard it too useful - of course on the frontend side it could be handy. In this case it would be great having a non-panel version of it, only a small input line in the TD bar, with results appearing above it, growing upwards. Probably this is harder to implement, just an idea.

See the attached image how I imagined the ajax-loaded page title (plus the template name used). It should be one line only, cropped if too long, with a small font size. Also its placeholder space should be there all the time to avoid jumping when typing.

td-ajax-title.jpg

  • Like 1

Share this post


Link to post
Share on other sites
11 hours ago, tpr said:

In this case it would be great having a non-panel version of it, only a small input line in the TD bar, with results appearing above it, growing upwards. Probably this is harder to implement, just an idea.

I'll have a think about this one - thanks for the idea.

 

11 hours ago, tpr said:

It should be one line only, cropped if too long, with a small font size. Also its placeholder space should be there all the time to avoid jumping when typing.

I have implemented this in the latest version - please take a look and let me know what you think.

  • Like 2

Share this post


Link to post
Share on other sites

Thanks, I like it. Perhaps the template link attracts the attention too much, I would go with something like this - but of course I can live with the current one too :)

td-gotopage.thumb.png.32f127f5181c847d50cf6c43d0a8d1df.png

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, tpr said:

Perhaps the template link attracts the attention too much, I would go with something like this

No worries - it's changed in the latest version. Thanks for the feedback!

  • Like 1

Share this post


Link to post
Share on other sites

Hi, my Tracy Debug bar has gone missing. It was in the lower right hand corner of the screen, but now there is just an icon that doesn't do anything in the lower LEFT hand corner of the screen. Before this I exported my site profile and am working on a new site, though I'm not sure what that would have to do with it. I have looked at all the options on the module settings page and no matter what I choose, nothing happens. I have now just upgraded to version 4.8.23. I'm testing locally on MAMP.

Attached are some screenshots of the icon and the errors I get in Chrome. Any ideas? Thanks!

 

 

errors.png

tracy.png

Share this post


Link to post
Share on other sites

@ryanC 

  • Do you have PW's debug mode on?
  • Any php errors being displayed or logged?
  • Any errors on the dev console's Network tab regarding Tracy files not being loaded?
  • Any issues with file permissions on the files within the Tracy folder after moving to new site?
  • Any files missing from the Tracy folder? Can you replace with a fresh set from Github?

 

  • 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 bernhard
      Some of you might have followed the development of this module here: https://processwire.com/talk/topic/15524-previewdiscussion-rockdatatables/ . It is the successor of "RockDataTables" and requires RockFinder to get the data for the grid easily and efficiently. It uses the open source part of agGrid for grid rendering.
       
      WHY?
      ProcessWire is awesome for creating all kinds of custom backend applications, but where it is not so awesome in my opinion is when it comes to listing this data. Of course we have the built in page lister and we have ListerPro, but none of that solutions is capable of properly displaying large amounts of data, for example lists of revenues, aggregations, quick and easy sorts by the user, instant filter and those kind of features. RockGrid to the rescue 😉 
       
      Features/Highlights:
      100k+ rows Instant (client side) filter, search, sort (different sort based on data type, eg "lower/greater than" for numbers, "contains" for strings) extendable via plugins (available plugins at the moment: fullscreen, csv export, reload, batch-processing of data, column sum/statistics, row selection) all the agGrid features (cell renderers, cell styling, pagination, column grouping etc) vanilla javascript, backend and frontend support (though not all plugins are working on the frontend yet and I don't plan to support it as long as I don't need it myself)  
      Limitations:
      While there is an option to retrieve data via AJAX the actual processing of the grid (displaying, filtering, sorting) is done on the client side, meaning that you can get into troubles when handling really large datasets of several thousands of rows. agGrid should be one of the most performant grid options in the world (see the official example page with a 100k row example) and does a lot to prevent problems (such as virtual row rendering), but you should always have this limitation in mind as this is a major difference to the available lister options that do not have this limitation.
      Currently it only supports AdminThemeUikit and I don't plan to support any other admin theme.
       
      Download: https://gitlab.com/baumrock/FieldtypeRockGrid
      Installation: https://gitlab.com/baumrock/RockGrid/wikis/Installation
      Quikckstart: https://gitlab.com/baumrock/RockGrid/wikis/quickstart
      Further instructions: https://gitlab.com/baumrock/RockGrid/wikis/quickstart#further-instructions
      German Translation File: site--modules--fieldtyperockgrid--fieldtyperockgrid-module-php.json
      Changelog: https://gitlab.com/baumrock/FieldtypeRockGrid/raw/master/changelog.md
       
      Module status: alpha, License: MIT
      Note that every installation and uninstallation sends an anonymous google analytics event to my google analytics account. If you don't want that feel free to remove the appropriate lines of code before installation/uninstallation.
       
      Contribute:
      You can contribute to the development of this and other modules or just say thank you by
      testing, reporting issues and making PRs at gitlab liking this post buying me a drink: paypal.me/baumrock/5 liking my facebook page: facebook.com/baumrock hiring me for pw work: baumrock.com  
      Support: Please note that this module might not be as easy and plug&play as many other modules. It needs a good understanding of agGrid (and JavaScript in general) and it likely needs some looks into the code to get all the options. Please understand that I can not provide free support for every request here in the forum. I try to answer all questions that might also help others or that might improve the module but for individual requests I offer paid support for 60€ per hour (excl vat).
       
      Use Cases / Examples:
      Colored grid cells, Icons, Links etc. The Grid also has a "batcher" feature built in that helps communicating with the server via AJAX and managing resource intensive tasks in batches:

      Filters, PW panel links and instant reload on panel close:

      You can combine the grid with a chart library like I did with the (outdated) RockDataTables module:

    • By thomasaull
      Some time ago I created a site profile for creation of a REST API with ProcessWire. Since I kept struggeling with updating stuff between different projects which use this, I decided to convert it into a module. It is now ready for testing: https://github.com/thomasaull/RestApi
      Additionally I added a few small features:
      automatic creation of JWT Secret at module install routes can be flagged as auth: false, which makes them publicly accessible even though JWT Auth is activated in module settings To check things out, download and install the module and check the folder /site/api for examples.
      If you find any bugs or can think of improvements, please let me know!
    • By kongondo
      Sites Manager
       
      16 September 2018:
      FOR NOW, PLEASE DO NOT USE THIS MODULE IN A PRODUCTION SITE. A  RECENT ProcessWire UPDATE HAS BROKEN THE MODULE. I AM WORKING ON A FIX.
       
      ################
       
      Sites Manager is a module for ProcessWire that allows Superusers to easily create/install ProcessWire sites on the same serverspace the module is running in. Only Superusers can use the module. You can create both stand-alone and multi-sites.
       
      Single/Stand-alone Sites
      Stand-alone or single-sites are sites that will run in their own document root/directory with their own wire and site folders, .htaccess, index.php, etc. In other words, a normal ProcessWire site.
      Multiple Sites
      Multi-sites are sites that will run off one wire folder (shared amongst two or more sites) each having their own site folder and database. In this regard, it is important to note that Sites Manager is not in itself a multiple sites solution! Rather, it is a utility that helps you create multi-sites to be run using the ProcessWire core multiple sites feature. For more on this core feature, see the official ProcessWire documentation, specifically the solution referred to as Option #1.
      Option #1 approach requires the site admin to initially install ProcessWire in a temporary directory for each new site. The directory then needs to be renamed as site-xxx, where ‘xxx’ is any name you want to use to differentiate the installation from other sites, before it is moved to the webroot. For instance, site-mysite, site-another, site-whatever. In addition, the /wire/index.config.php file must be copied/moved to the webroot. Each time a site is added, the index.config.php has to be edited to add ‘domain’ => ‘site-directory’ key=>value pairs for the site. This process can become a bit tedious. This module aims to automate the whole multi-site site creation process.
      The module is based off the official ProcessWire installer. Creating a site is as simple as completing and submitting a single form! You also have the option to type and paste values or reuse a pre-defined install configuration.
       
      The module will:
      Install a ProcessWire site in your named directory, applying chmod values as specified
      Move the directory to your webroot
      Update/Create a Superuser account as per the submitted form, including setting the desired admin theme and colour
      For multi sites, update sites.json (used by index.config.php to get array of installed sites)
       
      For multi sites, the only difference in relation to the core multi-sites index.config.php is that this file is slightly different from the one that ships with ProcessWire.
      Download from GitHub: Sites Manager (Beta Release)
      Features
      Install unlimited number of sites in one (multi-sites) or independent (single-site) ProcessWire installs. Install by completing a Form, Typing or pasting in configurations or using pre-created install configurations. Choose an Admin Theme to auto-install along with the site installation. For single-sites installation, download, save and reuse ProcessWire versions of your choice. Install and maintain site profiles for reuse to create other sites. Create install configurations to speed up installation tasks. Client and server-side validation of site creation values. Edit uploaded profiles (e.g., replace profile file). Lock installed sites, configurations and profiles to prevent editing. Bulk delete items such as site profiles, installed site directories and/or databases (confirmation required for latter two). View important site details (admin login, chmod, etc). Links to installed sites home and admin pages. Timezones auto-complete/-suggest. Pre-requisites, Installation & Usage
      Please see the documentation.
      Technicalities/Issues
      Only Superusers can use the module.
      ProcessWire 2.7 - 3.x compatible
      Currently using ProcessWire 2.7 installer (install.php)
      For multi-sites, potential race condition when sites.json is being updated on a new site install vs. index.config.php accessing the json file?
      Not tested with sub-directory installs (for instance localhost/pw/my-site-here/)
      Currently not doing the extra/experimental database stuff (database charset and engine)
      Future Possibilities
      Install specified modules along with the ProcessWire install
      Profile previews?
      Credits
      @ryan: for the ProcessWire installer
      @abdus: for the index.config.php reading from JSON idea
      @swampmusic: for the challenge
      Video Demo
      Demo  showing how quick module works on a remote server [YMMV!]. Video shows downloading and processing two versions of ProcessWire (~takes 7 seconds) and installing a single/stand-alone ProcessWire 3 site using the new Admin Theme UI Kit (~2 seconds) on a remote server.
       
      Screens
      1

      2

       
       
    • By Robin S
      Breadcrumb Dropdowns
      Adds dropdown menus of page edit links to the breadcrumbs in Page Edit.

      Installation
      Install the Breadcrumb Dropdowns module. The module requires ProcessWire >= v3.0.83 and AdminThemeUikit.
      There is a checkbox option in the module config that determines if the breadcrumb dropdowns will include pages that the user does not have permission to edit.
      Features/details
      The module adds an additional breadcrumb item at the end for the currently edited page. That's because I think it's more intuitive for the dropdown under each breadcrumb item to show the item's sibling pages rather than the item's child pages. In the dropdown menus the current page and the current page's parents are highlighted in a crimson colour to make it easier to quickly locate them in case you want to edit the next or previous sibling page. Unpublished and hidden pages are indicated in the dropdowns with similar styling to that used in Page List. If the option to include uneditable pages is selected then those pages are indicated by italics with a reduced text opacity and the "not-allowed" cursor is shown on hover. There is a limit of 25 pages per dropdown for performance reasons and to avoid the dropdown becoming unwieldy. If the current user is allowed to add new pages under the parent page an "Add New" link is shown at the bottom of the breadcrumb dropdown. If the currently edited page has children or the user may add children, a caret at the end of the breadcrumbs reveals a dropdown of up to the first 25 children and/or an "Add New" link. Overriding the listed siblings for a page
      If you want to override the siblings that are listed in the dropdowns you can hook the BreadcrumbDropdowns::getSiblingsmethod and change the returned PageArray. For most use cases this won't be necessary.
      Incompatibilities
      This module replaces the AdminThemeUikit::renderBreadcrumbs method so will potentially be incompatible with other modules that hook the same method.
       
      https://modules.processwire.com/modules/breadcrumb-dropdowns/
      https://github.com/Toutouwai/BreadcrumbDropdowns
    • By Ken Muldrew
      I'm trying to get a short routine to run once per day that will look at some pages and send a reminder email when that customer's subscription (yearly) is about to expire. When I run the code in a template then it works without issue, but inside my lazycron service routine, I get an "Error: Uncaught Error: Call to a member function get() on null" as if the database cannot be found. My autoload module is just the sample HelloWorld module included with ProcessWire, editted to perform this task. The whole of it is included below (I've stripped out the code that generates the email because it never gets past $pages->find):
       
      <?php namespace ProcessWire;
      /**
       * ProcessWire 'LazyCronLoad'  module
       *
       */
      class LazyCronLoad extends WireData implements Module {
          public static function getModuleInfo() {
              return array(
                  'title' => 'LazyCronLoad', 
                  'version' => 1, 
                  'summary' => 'Just loads a lazy cron callback.',
                  'singular' => true, 
                  'autoload' => true, 
                  );
          }
          public function init() {
              // initialize the hook in the AutoLoad module
              $this->addHook('LazyCron::everyDay', $this, 'myHook');
              
          }
          public function myHook(HookEvent $e) {
              // called once per day
              wire('log')->save('user_activities',' lazy cron service routine');
                  $transport_pages = $pages->find("template=aggregate-entry, aggregate_type.title='Transport'");
                  foreach ($transport_pages as $page) {
                      if (($page->purchase_date + 30325800 < time()) && ($page->purchase_date + 30412600 > time())) { // between 351 and 352 days
                          wire('log')->save('user_activities', $page->id . ' email reminder sent');
                          // send email
                  }
              }
          }        
          
      }
      The first wire('log') shows up but the second one doesn't (the purchase_date condition is met (as demonstrated by running the code in a template close in time to when the lazycron routine executes)). The error log gives the Uncaught Error shown above. 
      I think this is a beginner's mistake with something obvious being missed and would be grateful for any assistance in fixing it.