Jump to content

adrian

PW-Moderators
  • Posts

    11,032
  • Joined

  • Last visited

  • Days Won

    359

Everything posted by adrian

  1. Hi @MarkE - sorry, I am really not following what you mean by the hook only called by Tracy. Can you provide a complete example to test?
  2. @poljpocket - I still think it would be worth optimizing the staff poster images - they all seem to be around 2.5MB which even on my fibre optic connection takes time and you can see them visibly loading.
  3. While you are optimizing images, don't forget this one: view-retro-looking-personal-computer-2-1-1.png (on https://fruitcake.ch/projekte/40-jahre-fruitcake/) which is 14.7 MB :)
  4. Hi Ivan, I am not seeing any issues copying content from Tracy panels including the Mail Interceptor. That said, there are quite a lot of "user-select: none" declarations within the Tracy core and my add-on code: https://github.com/search?q=repo%3Aadrianbj%2FTracyDebugger+"user-select%3A+none"&type=code but I don't think any of these should impact copying from the content of a panel. Could you please perhaps inspect the elements you are trying to copy and see if somehow there is a "user-select: none" declaration applied to them?
  5. If I enable guest dumps (via the button on the panel selector) and use bd() instead of d() then after calling a script via the command line, I can reload the site in the browser and the bd() calls will be displayed. Does that help? The only other solution I can think of at the moment is to maybe check if the snippet is called via the CLI and convert d() calls to print_r() automatically? I've done some quick experiments on that idea and seems fairly useful. By the way - just making sure that you're familiar with the Console panel's "Code Prefix" settings field for adding that: <?php namespace ProcessWire; if(!defined("PROCESSWIRE")) include(dirname(__FILE__).'/../../../../index.php'); block automatically to each snippet.
  6. Does it work as expected with renderReadyHook() as per the docs?
  7. @nurkka - I agree, but a couple of things that might help you in the meantime. If you install https://processwire.com/modules/module-settings-import-export/ it will automatically backup module settings when it's uninstalled so that you can easily get settings back where they were when you reinstall it. Also, Tracy's Module Disabler panel can be helpful to disable modules without uninstalling - the catch is that it needs advanced and debug modes turned on to work.
  8. @Erik Richter - depends on what aspect of it you are looking for - if it's just the searchability, then check out the AsmSearchBox tweak in https://github.com/baumrock/RockAdminTweaks
  9. @Kiwi Chris - does this happen with the Settings tab is hidden, or something else? I wonder if you'd mind checking if the same thing happens if you enable PW advanced mode and use the "Disable Settings Tab?" on a template (System tab). Thanks.
  10. Sorry to go OT but I would love to know more about this - could you perhaps file a GH issue or post about it in the Tracy forum. Would definitely like to fix any issues you are having.
  11. Hi @virtualgadjo - I am glad unchecking the overwrite names option solved things for you. I dug into that section of code and discovered an issue with duplicate titles (when both set during a batch update) and fixed that in the latest version. I don't think this change will help what you were seeing - I think that is something ML that I haven't been able to reproduce, but at least I found and fixed something else :)
  12. I'm at a bit of a loss at the moment - I can't replicate the original error and I can't replicate any weirdness with hidden page behaving differently when publishing/unpublishing. I feel like it's due to something in here: https://github.com/adrianbj/BatchChildEditor/blob/9cdf3b7f317d9f8c07bc75faf150e5ba9490dfb6/BatchChildEditor.module.php#L1348-L1355 but not really sure why if page titles / names aren't being changed at the time you are unpublishing. Can you check to see if this section of code is being called and maybe dump the value of $name for all the child pages in the loop to see if there are indeed any duplicates at this point?
  13. @virtualgadjo - does that error happen every time you try to unpublish them all or did it only happen once like this? Is "weekendatbinnys-champagne-tasting" a field or child page name? Is ID 1019 a language page?
  14. https://processwire.com/blog/posts/processwire-core-updates-2.5.14/#multiple-copies-of-the-same-module
  15. Hey @bernhard - I think there's a bit of a problem with storing the enabled settings in wireCache. The cache can be manually cleared for a variety of reasons, and also really important is the fact that the default expiry is 24 hours which makes it pretty useless for this purpose :) Why can't these be stored in the module's config settings?
  16. You make some very good points - conditional loading of js/css in the php file does make things much easier for sure (like your superuser only example) and it would be painful to handle this any other way, so maybe keeping things as is will be fine. Sorry about the PRs to main - I didn't check if you have a dev branch. Are you OK handling the current ones as is so long as I modify the upcoming ones? I think an additional notes parameter could be useful. Perhaps also a link parameter that could automatically populate those info icons you added to a couple of tweaks within the description. Maybe also an author parameters (maybe GH username) so it's easy to keep track of who needs to be contacted for support going forward? Of course, the other approach to this would be something like what I did with AdminActions - see Robin's addon action maintained in his own repo (https://processwire.com/modules/admin-actions-replace-home/). I like the idea of separate maintenance without the need for PRs, but it would also be a pain for others to find all the tweaks, so probably a bad idea in reality.
  17. @bernhard - what do you think about compiling, minifying, and caching the css and js assets into one single file each? I just worry about how many extra requests all these tweaks will end up being. BTW - I have more AOS ones coming :)
  18. Thanks for the subfolders - much better for complex tweaks, especially those that require additional assets like the AOS column break I just ported over. I know about admin.less and I do use it. I guess I kinda of forgot in this context because I've been loading an admin.css via AOS for my standard tweak for so many years now.
  19. Sorry :) I'll leave @jploch to answer that, but I think the request for these arrows is in the spirit of making editing children easier in general from the main Content view.
  20. @ryan - the arrows after the page title in Bernhard's screenshot above is what is being referred to.
  21. Hey @bernhard - I am thinking of revisiting this module now that it seems to be getting some traction but have two questions before I start pulling out the key things from AOS that I need. 1) What about having subfolders for each tweak so that we don't end up with a mess of php, js, css files for multiple tweaks in the one categorizing parent folder? 2) I am also thinking about a replacement for AOS's Assets Paths > Admin CSS and Admin JS feature. Perhaps it's a simple matter of creating a custom local tweak that just calls loadCSS() and and loadJS() for all those random tiny tweaks that are small enough and don't need a specific hook (and therefore PHP file). Any thoughts? Thanks.
  22. @jploch - this is a feature that AOS has which I enable it on all sites - very handy indeed, as is of course BreadcrumbDropdowns.
  23. Then we could use the system "published" property, no? Regardless, even if there is a need for a custom date field of some sort on the post template, that could still drive that getRaw() example I posted. Not saying it's the right way to go - just highlighting some other options.
  24. You could also simply get the parent by using the parent property. Of course you don't need to use setAndSave() but I feel it's cleaner in a situation like this. I also like using $p rather than $p because even though the scope will prevent $page from overwriting the PW $page object, I still find it less confusing, but that's just a personal preference. $wire->addHookAfter("Pages::published(template=post)", function (HookEvent $event) { $p = $event->arguments(0); $blog = $p->parent; $blog->setAndSave('date_modified', $p->date_modified); }); Also, in case you don't know, there is a system "modified" property rather than adding a separate custom field for that. Another thought - if updating the modified date for the blog parent is just about using it to display on the website, perhaps you can just get the modified date of the most recently modified post, eg:
×
×
  • Create New...