Jump to content

adrian

PW-Moderators
  • Posts

    10,902
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. One thing I don't get here is why that DatabaseMysqli.php file is being called. I don't think the PW core use mysqli anywhere these days. Do you have a module that is using $db vs $database?
  2. Hi @Robin S - I can't seem to reproduce this - the Request Info panel appears to be only adding one call. I am using the HannaCode textformatter and adding: bd($field->name); to the first line of the formatValue() method and with the RequestInfo panel open I get two dumps, and with it closed I get one. Could you share the module you are working on, or perhaps test with Hanna code, and maybe with a different field/template combo to see if there is something more specific required to reproduce? PS - Are you running the latest version of Tracy?
  3. Thanks @tpr and @Robin S for your work and thoughts on this. I haven't had time to test thoroughly regarding template level sort etc, but I just wanted to note that the initial issue of loading all siblings is definitely now fixed
  4. Would it be easier/more efficient to have << first < prev > next >> last links instead of trying to loop around at the beginning and end?
  5. How about: $this->editedPage->siblings('sort=-sort, limit=1')->first()
  6. Ok, dumping with the __debugInfo() magic method is now the default. You can disable this in the config settings if you don't like it and you can override for a specific dump with something like this: d($page, array('debugInfo' => false)); Hope you guys find this useful!
  7. Thanks @bernhard and @Robin S - a little more detail on PW's implementation of __debugInfo() is here: https://processwire.com/blog/posts/processwire-core-updates-2.5.27/#php-5.6-and-debuginfo and also point "8" from https://processwire.com/blog/posts/processwire-2.6-rc1-2.5.29-and-more/#processwire-and-phps-interactive-mode Robin, you are correct that the output will depend on what the developer of the class makes available. You end up with something like this which I think in general is much more helpful than the default: I think in general Ryan has done a great job with what is returned and I think for most Tracy users most of the time, this will be preferable to the full object. I think the best option might be to make it on by default, but you can either override this in the config settings globally, or you could pass: debugInfo => false in the d() or bd() call's $options parameter if you want the full object. Sound ok?
  8. Hi everyone - looking for some feedback. The Tracy core has just introduced an option to dump objects using the __debugInfo() magic method which PW also supports. It changes this: to: What I am wondering is whether to make using __debugInfo() the default or not. And also wondering how often you guys might want to switch between one vs the other - in other words, will it be ok as a config setting, or do you think it's something that should be easier to change on-the-fly? Thanks for any input.
  9. @Martijn Geerts - thanks for this module - it's coming in very handy right now! When you get a minute, it would be great if you could fix the PHP 7.2 countable errors: 34× PHP Warning: count(): Parameter must be an array or an object that implements Countable in .../modules/FieldtypeFields/FieldtypeFields.module:159
  10. Just had a look for the cause of this and it's: $siblings = $this->editedPage->siblings; which of course loads all siblings. I think you'll need to do: $numSiblings = $this->editedPage->parent->numChildren(); or you could separately check if prev and link page ids exist without the siblings check at all. I know you wanted the links to loop back to first when at the end etc, but I think that needs to be a separate page->get() if at end. Does that make sense?
  11. @bernhard - could you please check the latest version for me - I left out "include=all" for the prev/next links in the last commit. Everything still seems fast here, but would appreciate it if you could confirm it's ok at your end too please?
  12. Don't forget to also take a look at it when editing a field, template, or module - shows all the settings for those in addition to the normal sections. Can be very handy for certain dev needs.
  13. Glad to hear! In the Request Info Panel. The name is a View link and the ID is an Edit link.
  14. Hey @bernhard - sorry for the delay on this - had family in town. Please try the latest version - it prevents all siblings from being loaded by the prev/next links in the Request Info panel (which was a bug I hadn't noticed). This should actually make a huge different to anyone using Tracy on a page with a lot of siblings - can't believe I didn't come across this till now - thanks for bringing it to my attention. One caveat - if you are running AOS with the "Add links to edit previous and next pages" feature enabled you might still have problems, although it shouldn't affect page load speed. I have made a note here:
  15. Looks like the "Add links to edit previous and next pages" feature results in all sibling pages being loaded - this can be problematic if there are lots of siblings. As soon as I disable that feature it drops down to ~100 pages loaded.
  16. As a followup @bernhard - I notice that when editing a child with thousands of siblings, all the siblings get loaded, but this doesn't seem to be a Tracy issue - take a look at the PW core Debug Mode panel. I wonder if that's a bug?
  17. @bernhard - could you please let me know how it goes when you disable the "Pages Loaded" section in the Debug Mode panel. This seems to be the main issue at my end.
  18. Looks to be great - thank you!
  19. Can you post a screenshot of the contents of the Field List & Value section? Or maybe you can send me a test version of the module so I can take a look?
  20. My guess is that it's the Field List & Values section of the Request Info panel. Can you try disabling just that section and let me know?
  21. I hadn't really thought about it, but if you think that's better, that's fine. The main thing is that I have a LOT of extra fields in my user template on one of the sites I am working on and I am missing that functionality.
  22. Hey @tpr - would you mind enabling field edit links for the user template please? I expect it's just a matter of adding ProcessUser instead of just ProcessPageEdit Thank you!
  23. Hi @szabesz - sorry I only have a minute at the moment, but I see that you are using an after hook, but in CustomUploadNames I use a before hook: https://github.com/adrianbj/CustomUploadNames/blob/master/ProcessCustomUploadNames.module#L98 Does that help?
  24. Actually, I got that wrong - the problem is that you need the trailing slash after the urlsegment for it to work, which doesn't seem right to me since it can be optional.
  25. Just noticed that using: $input->url(true) to get urlsegments doesn't work, you need: $input->httpUrl(true) Does this sound like a bug to you guys? According to the docs (https://processwire.com/api/ref/input/url/) it should work.
×
×
  • Create New...