Jump to content

adrian

PW-Moderators
  • Posts

    10,898
  • Joined

  • Last visited

  • Days Won

    348

Everything posted by adrian

  1. Hi @johnstephens - thanks for looking into it further - sorry I didn't respond to your last message - I didn't really see anything I could use to reproduce it. It does sound like you might be onto something with the memory error idea. I am curious what is in your bd() call - are there a lot or heavy objects being dumped? How many results are you looping through? If I try to dump too many items, eg: for($i=0;$i<99999999;$i++) { bd($i); } And I do get an out of memory fatal error and the debug bar fails to load, but I fixed it by increasing the "Reversed memory size" option in Tracy's config settings. Please let me know if that works for you.
  2. Hi Robin, It's only a minor thing, but I just noticed this when clicking the show when using InputfieldSelector. Note the position of the calendar icon on top of the page numbers. matches 1716 pages (show)
  3. Good catch - thanks for noticing that - I'm not on it this morning apparently :) Well @Ivan Gretsky - at least using $config->paths->data should work for you. I'll still keep an eye on that $maxItems setting and implement when available and see if it handles that other situation.
  4. Interesting - I am seeing that also with that example, but definitely items are truncated to 100 when dumping $config->paths and if I force Tracy to use 2.7 then it's no longer truncated. I don't know why there is a difference - maybe there is some logic that controls when the $maxItems of 100 is implemented?
  5. Are you sure it's actually showing all 110? It shows the total count, but the not all items are shown - at least that's what I am seeing.
  6. It won't fix this issue though because the "big" version of those methods only increases the "maxDepth" and "maxLength" attributes. It doesn't support increasing the "maxItems". In fact maxItems is new to the Tracy core in 2.8 and 2.9. In 2.7 and earlier there was no limit to the number of items so this setting wasn't needed as all items would have been dumped.
  7. @Ivan Gretsky - if you need this immediately, you can always edit this: https://github.com/adrianbj/TracyDebugger/blob/e6088e92ddb052382382edf290077d929832410f/tracy-2.9.x/src/Tracy/Dumper/Describer.php#L34
  8. To clarify @bernhard depth is the number of levels in an array, vs the number of items in the array.
  9. @Ivan Gretsky - there is already an issue about this on the core Tracy repo: https://github.com/nette/tracy/issues/531 Once this is made available, I'll support it in this module.
  10. I've added it to the latest version. Thanks for noticing this - I think there might be other things that could have been confusing as it was, so I think this is a good improvement.
  11. Turns out with your "get" version, you can also use getFresh() and it will work. Although I actually think this is kind of a bug in the Console panel. What do you think about me replacing line 73 of CodeProcessor.php with: $setVars = '$page = $pages->get('.$page->id.'); $pages->uncacheAll();';
  12. Hi @Robin S - not completely sure, but here's a little more insight: This version shows that it is theoretically joining the "summary" field, and if I look at the Selector Queries section of the Debug Mode panel, I see: which shows that it is being joined as expected. Now if I do this same find operation in a template file, I get: Sorry for the rambling, but I am posting as I try new things :) I've noticed that if I run this via the Tracy console it actually does work as expected depending on what page you are on. It seems like it works anywhere on the frontend and anywhere on the backend, except when editing a page (which is what I was doing for my first test above). For example, you can see it working when viewing the page tree. Actually, it even seems to work when editing some page, but not all. What page / view are you on when testing and does that impact what you see?
  13. @ryan - I wonder if it would be possible to also get the template name in the returned array? I need this to be able to group results. I also need to the know the parent template name - could it be possible to have a sub array with details about the parent included for each result? The other thing that I am struggling with is sorting the results. Obviously there are PHP ways to do this, but it would be great if PW's sort method was available here as well. To give you a bigger picture, I am trying to convert: $references = $page->references('has_parent!=1051, sort=template'); $references->sort('template, -date, -start_date, -year, -year_rt, -parent.month, title'); to use findRaw() with the new references option. For this sort to work, I actually also need to be able to sort via the "month" field in the parent. I am guessing you'll say that this is beyond the scope of findRaw() which might be fair, but I thought I'd provide a real world use case where this takes the query time from: 1260.47 ms, 14.2 MB down to 297.23 ms, 854.6 KB so it's a huge performance gain if it can be made to work.
  14. Thanks for the IN fix. Sorry about the empty results issue - was a mistake in my selector. Everything looks great and this is a really nice feature for generating long lists of documents, blog posts etc associated with a person. Thank you!
  15. Sorry, also a bit confused about the results I am getting. Am I doing something wrong? Shouldn't I expect to see key / value pairs for title, and url for each of the results?
  16. Thanks @ryan - the "references" for findRaw is awesome. The only catch is that if there are no results, then we get an sql error. Exception: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1 on line: 1311 in /var/www/myseatosky.org/html/wire/core/PagesRaw.php The query it's complaining about is: SELECT pages_id, data FROM field_actions WHERE data IN() Let me know if you have any problem reproducing.
  17. That's exactly what I was looking for - thank you. I think in most cases having an actual date time is preferable for most people.
  18. Now I am going to be annoying and ask if it would be difficult to set a default format. Maybe by setting the default as the first option entered in the Date Options config setting?
  19. I'd be interested to see that code to see if there is something I can do to prevent Tracey from not capturing that error and breaking it from loading.
  20. @gornycreative - if I understand correctly, this should work. $searchEngine->addHookAfter('Renderer::renderTabLabel', function($event) use($types) { $event->return = $event->return . 's'; }); I was modifying the tabs a little more via a $types associative array, which you can see here. Just for fun I also included the hook I used to add images to the results. In the end I actually stopped using the built in tabs feature because even though it's really awesome, it doesn't work with multiple operators like: *=~= so I built up the tabs manually and now I can even change the operator if the user has wrapped something in double quotes to make it an exact match.
  21. I'd love to know your favorite PW alternative - if something else exists with all the features, flexibility and ease of PW which also has full compatibility with version control, that would be perfect. Surely it would require a flat file database, but even that has its problems when it comes to data querying, doesn't it?
  22. Glad that solution works for you. I suppose DDEV is doing something unusual in regards to the normal 127.0.0.1 for localhost that must be messing with the isLocal() detection.
  23. Hi @bernhard - a few questions / comments. 1) Does it work if you select DEVELOPMENT instead of DETECT? 2) DETECT should take care of determining whether you are in a local dev environment vs a remote server. 3) The Output Mode panel will tell you what mode has been detected. 4) Does it help if you put this in your config.php? $config->tracy = [ 'outputMode' => 'development', 'guestForceDevelopmentLocal' => true, 'forceIsLocal' => true, ];
  24. @Jonathan Lahijani - I love it - your comments have a very similar tone of ridiculousness that my list has :) Firstly, I am glad you found Forklift - I use it exclusively and I actually love it for FTP because I can open files directly from a remote server into my code editor and saving the file will send it straight back to the server. Obviously the dual pane is essential, especially given the stupidness of the cut / paste situation. The other crucial thing it has for me is being able to order folders first, and then files - that is truly the dumbest thing in MacOS. The Enter to rename drove me crazy for a while too, as did not being able to delete a file by hitting the delete key - don't even get me started on the lack of an actual delete (vs backspace) key on laptop keyboards :), but I am mostly over that now. These days I only use the trackpad (because damn they are nice on macs - pity the magic mouse is garbage), so the acceleration stuff doesn't bother me, but I can imagine. Oh, and yes to the window focus stuff - definitely annoying. Another utility you should try is BetterTouchTool - it has lots of mouse / trackpad settings, along with window features like snapping, but most importantly bringing proper window maximizing (rather than full screen) with the plus icon. Regarding having Finder first on the dock - I almost never use the dock because I have Alfred, so app launching / switching is with the keyboard. You might also like to try Hyperswitch for a more Windows like dock. Anyway, despite all the bad UX stuff, I generally do find it much more stable and it's amazing to have not reformatted / reinstalled the OS once in 10 years. I also love the unix basis to the OS - I know there is now WSL, but it wasn't around when I was using Windows.
×
×
  • Create New...