Jump to content

bernhard

Members
  • Posts

    6,671
  • Joined

  • Last visited

  • Days Won

    366

Everything posted by bernhard

  1. you can get this error if you have only one declaration but you call it multiple times (eg by including it multiple times). maybe you have markup regions turned on? you could use tracy and a simple bd('test'); to see how often it is called. then you can inspect the backtrace: bd(debug_backtrace());
  2. I guess "all of a sudden" means "after upgrading to the latest version" ?
  3. hey @adrian thanks for the great updates! $results = $pages->find('template=xyz,limit=10'); foreach($results as $i=>$p) { $i++; d($p); $p->save(); } this does not dump anything. as soon as i remove $p->save() it dumps the correct object.
  4. Watched your screencast now and have to say wow! It looks really impressive and it seems you put a lot of work in it. It reminds me a little of my very first processwire project: The problem is that this approach is hard to reuse on other projects. You'd basically need to build everything new from scratch. If you copy everything you end up with two different versions whenever you add a feature or fix a bug. Or you need to fix it on all your projects. I'm thinking a lot of some kind of FrontendThemeUikit Module that would bring in some reusable standards and make such a setup plug&play. Your site seems to be a good example what could be achieved!
  5. welcome to the forum @Hans0L0 I've setup a custom search shortcut "api" in my browser so i can just type "api and" and will get this result: You'll then get to the api docs quickly: https://processwire.com/api/ref/wirearray/and/
  6. Thanks for the monosnap hint. I compared it to http://getgreenshot.org/ (I've been happily using it for years now) and just realized that it's even possible to upload screenshots directly to imgur (just tried it with the screenshot above). This will save me & ryan from several MB of diskspace ? For longer and more professional screen recordings I use https://screencast-o-matic.com/refer/cXhu2n69l. It is free for up to 15min but I have the paid version with better editing and upload features. If you use my referral link you get 20% off. It get's even cheaper if you take the 36-month-subscription (then without referral): https://screencast-o-matic.com/subscribe?plan=pr1
  7. Absolutely awesome ? tpr is right about the bottom border but it's already great imho ?? for my understanding I'd also see the white tab as the active one (having the same colour as the dump section)
  8. Im on mobile so I can't do a mock-up but I vote for a text based solution like matjazp mentioned and I would put the tabs above the dump. Just like the tabs in processpageedit. They would be code for the mouse and would not mess up alignments on the left or right. I don't want any automatic additional info. As Adrian said the need is always different and the solution is just one extra dump away. Please save your time Adrian ? thanks for all your great work! Still waiting for a donation button ?
  9. That was my suggestion: But I guess that's more effort than just implementing a new method dumpVerbose() with different settings. Let's wait for adrian to wake up - good morning btw ??
  10. I don't care about how we call it, but I care about what it shows and dumping/debugging/infoing a page object that is then labelled as array is simply not what I understand as good/correct dumping/debugging/infoing. PS: actually I even do care a little about how we call it ? dump() is already some kind of standard. we have dump() and bardump() and it's called exactly like this in the nette docs. It's a better alternative for var_dump() and well... that also "dumps" variables. We already have firelog() and log() so I see no need for introducing another one (for me d() and dv() would be a similar thing and mean about the same just with different options. dump() and dumpVerbose() => tracy bar, log() => file, firelog() => dev console).
  11. At first glance I liked the array-approach, but thinking about it a little bit more I think it is not a good idea to modify the type of the originally dumped object. It should really output the correct type. Also @szabesz suggestion would be a wrong output for my understanding. Having one d() call output two dumps on the other hand can also be misleading. IMHO the best solution (and I guess also the simplest one) would be to have d() output the debuginfo version and dv() = dumpVerbose() output the verbose info with debugInfo = off. I don't think that a config setting is necessary or any better. I think it's even more confusing and one more thing to keep in your mind. Another setup and you might end up in another output. Not the best option. d() and dv() would just be one thing to remember across all setups and it would produce a consistent output always and everywhere. EDIT: Another option I could think of would be something like this, having a toggle in the label section showing/hiding one or the other but outputting only one visible object for one single dump and also showing correct variable types: The label, eg d($page, 'my custom label'); could also be shown right beside the toggles
  12. yep, one theme is absolutely fine for me. looks great already! ?
  13. I've also had such an issue several times but no time so far to check out the reason
  14. If you only need a simple map you can still integrate it as simple iframe (example https://www.hrdiamonds.com/kontakt/ ) Openstreetmap has been a very good and reliable solution for several years. Sometimes their data is even better than google's. It's also a great project for collaboration in case of desasters where everybody can help to digitalize the current situation. There are also lots of different tile providers based on openstreetmap data having customized renderings, like https://www.opencyclemap.org/ Leaflet on the other hand is a very good JavaScript library to DISPLAY this data. Another one is OpenLayers (really powerful but not so light-weight). Lots of options ? Didn't know about here.com, thx @zoeck
  15. Little offtopic and self-promotion here, but you should definitely give RockGrid a try. It's such a great way to list all kinds of content, style it properly, add additional functionality. In the example below you get instant filtering, properly formatted currencies, referenced pages and some hover-action-icons that open that page in a panel or open the PDF invoice directly. The pagetree is great for websites, but it's definitely not for other more complex content management applications ? So true ? (y)
  16. Added support for joining multiple finders. You can even join finders on columns of previously joined finders ? In this example I'm joining projects (finder1) and their related clients (single page reference field of project) and then I join the referral contact of the project's client based on the "camefrom" id of finder2:
  17. not sure how that should look like exactly but it sounds good to me ?
  18. Thank you. Actually I came up with a somewhat different idea. I had to debug something yesterday and needed ['debugInfo' => false] several times. In fact I need it that often that I can even remember it by heart ? My Idea: What if we had a bdv() method instead of bdb, meaning barDumpVerbose() that has a limit of 9999 AND debuginfo set to false?
  19. thanks - already using it and i like it! ?
  20. why not learn from existing solution? ? https://modules.processwire.com/modules/inputfield-urlchecker/
  21. found another strange behaviour while testing my new RandomPageName module: The string should actually have a length of 4 (not 5), the "minDigits" setting of 2 would also be true for "8y4k" so the final "x" is unnecessary (wrong) imho...
  22. glad you find it useful. please use caution until this issue is solved (maybe you find some time to help me debugging/testing?):
  23. EDIT: See this blog-post for new PW core features for pagenames: https://processwire.com/blog/posts/pw-3.0.111/ This autoload module adds two new methods to the $page object: $page->getRandomPageName() $page->setRandomPageName() You can define options for the random string via an array (see /core/Password.php for all options): $page->setRandomPageName([ 'minLength' => 5, 'maxLength' => 5, ]); You can also define the subset of pages where the new pagename should be unique: $page->setRandomPageName("has_parent={$page->parent}", [ 'minLength' => 3, 'maxLength' => 3, ]); https://gitlab.com/baumrock/RandomPageName (see readme for examples) Do you think this is useful? Any feedback or suggestions of a better approach are welcome.
  24. As far as I understand this does only mean that if you had a setting 'minUppercase' => 2 and your initial random string would be aaa it would add 2 uppercase characters and result in aaaBB exceeding the maxLength setting. But if I don't have any conflicting additional settings (which I think I do not have) it should always return a 3 digit string in my opinion.
  25. Most of the time I'm getting a 3 digit password, but sometimes it is longer like here: To copy&paste: $pw = new Password(); d($pw->randomPass([ 'minLength' => 3, 'maxLength' => 3, 'minLower' => 0, 'minUpper' => 0, 'minDigits' => 0, 'minSymbols' => 0, 'maxSymbols' => -1, ])); From core/Password.php: * @param array $options Specify any of the following options (all optional): * - `minLength` (int): Minimum lenth of returned value (default=7). * - `maxLength` (int): Maximum lenth of returned value, will be exceeded if needed to meet other options (default=15). * - `minLower` (int): Minimum number of lowercase characters required (default=1). * - `minUpper` (int): Minimum number of uppercase characters required (default=1). * - `maxUpper` (int): Maximum number of uppercase characters allowed (0=any, -1=none, default=3). * - `minDigits` (int): Minimum number of digits required (default=1). * - `maxDigits` (int): Maximum number of digits allowed (0=any, -1=none, default=0). * - `minSymbols` (int): Minimum number of non-alpha, non-digit symbols required (default=0). * - `maxSymbols` (int): Maximum number of non-alpha, non-digit symbols to allow (0=any, -1=none, default=3). * - `useSymbols` (array): Array of characters to use as "symbols" in returned value (see method for default). * - `disallow` (array): Disallowed characters that may be confused with others (default=O,0,I,1,l). Am I missing anything or shouldn't it always return a 3-digit password in this case?
×
×
  • Create New...