Jump to content

adrian

PW-Moderators
  • Posts

    10,866
  • Joined

  • Last visited

  • Days Won

    348

Everything posted by adrian

  1. Thanks for the explanations. I actually use strtr quite a lot for an array of substring replacements - works great. Sorry for the confusion about how it replaces - I wasn't thinking straight and was thinking about this difference: "strtr will not replace in parts of the string that already have been replaced - str_replace will replace inside replaces", rather than the replacing only the first occurrence - sorry I rushed without thinking it through - my bad :(
  2. @Michael Lenaghan - I am curious - did you find an issue with strtr or just went with Laravel's approach without looking into it? Not a criticism at all, just want it to be a learning experience for all of us if you did find an issue.
  3. Maybe "strtr" instead of "str_replace" would take care of things as it only replaces the first instance. I am surprised though that it's not mentioned at all here: https://stackoverflow.com/questions/1252693/using-str-replace-so-that-it-only-acts-on-the-first-match so maybe I am missing something? Perhaps this is worth a thorough read: https://stackoverflow.com/questions/8177296/when-to-use-strtr-vs-str-replace
  4. Checking all 3 of these will probably do what you want, but I actually never use the second two because I make use of the "Enable Guest Dumps" button from the panel selector. Enable that, do what you need to do as a guest in a private window and then reload the PW admin where you are logged in as a superuser and you'll get the dumps recorded by the guest. Another thing is to make sure you have the "Tracy Exceptions" panel enabled so that if a guest user interaction results in an exception, the bluescreen with full stack trace will be made available for easy viewing. I rely on this for all my sites with Tracy's production mode. Hope that helps.
  5. Weird - maybe you had just never saved the settings so the format wasn't available? Anyway, shouldn't matter now regardless.
  6. Hi @AndZyk - you don't need to select an output format - none is perfectly valid (it's basically "unformatted"). That said, I have fixed the error if for some reason you decide to empty the options textarea. PS - it's worth figuring out the syntax- I know it looks a bit overwhelming at first, but it's really powerful and keeps your template code much cleaner.
  7. Yep, running 0.1.1 Any chance you could post this on a live site somewhere you could give me a superuser login to test it out for you?
  8. Would you mind uninstalling and reinstalling Tracy and see if that takes care of things please?
  9. Hi @olafgleba - I just tried a table field in repeater matrix and it looks ok here so I really don't know what's happening at your end I am sorry. Maybe a conflict with one of the other fields in the RM field? Does it work with only a table field in the RM field? Perhaps you can start with the simplest example of just a table field in a RM field with nothing else and if that works try to figure out what it breaking it. Sorry I am not much help :)
  10. Sorry, it's the Debug Mode panel - in the Cache section.
  11. Hi @AndZyk - it seems like you have an empty "Phone Output Format Options" field in the module's config settings. By default, it is populated with the following, so you can paste this in, or build your own format. Does that fix things for you? /*North America without separate area code*/ northAmericaStandardNoSeparateAreaCode | {+[phoneCountry]} {([phoneNumber,0,3])} {[phoneNumber,3,3]}-{[phoneNumber,6,4]} {x[phoneExtension]} | 1,,2215673456,123 northAmericaStandardNoSeparateAreaCodeNoNumberDashes | {+[phoneCountry]} {([phoneNumber,0,3])} {[phoneNumber,3,7]} {x[phoneExtension]} | 1,,2215673456,123 northAmericaStandardNoSeparateAreaAllDashes | {+[phoneCountry]}-{[phoneNumber,0,3]}-{[phoneNumber,3,3]}-{[phoneNumber,6,4]} {x[phoneExtension]} | 1,,2215673456,123 northAmericaStandardNoSeparateAreaDashesNoNumberDashes | {+[phoneCountry]}-{[phoneNumber]} {x[phoneExtension]} | 1,,2215673456,123 /*North America with separate area code*/ northAmericaStandard | {+[phoneCountry]} {([phoneAreaCode])} {[phoneNumber,0,3]}-{[phoneNumber,3,4]} {x[phoneExtension]} | 1,221,5673456,123 northAmericaNoNumberDashes | {+[phoneCountry]} {([phoneAreaCode])} {[phoneNumber]} {x[phoneExtension]} | 1,221,5673456,123 northAmericaAllDashes| {+[phoneCountry]}-{[phoneAreaCode]}-{[phoneNumber,0,3]}-{[phoneNumber,3,4]} {x[phoneExtension]} | 1,221,5673456,123 northAmericaDashesNoNumberDashes | {+[phoneCountry]}-{[phoneAreaCode]}-{[phoneNumber]} {x[phoneExtension]} | 1,221,5673456,123 /*Australia*/ australiaNoCountryAreaCodeLeadingZero | {([phoneAreaCode,0,2])} {[phoneNumber,0,4]} {[phoneNumber,4,4]} {x[phoneExtension]} | 61,07,45673456,123 australiaWithCountryAreaCodeNoLeadingZero | {+[phoneCountry]} {([phoneAreaCode,1,1])} {[phoneNumber,0,4]} {[phoneNumber,4,4]} {x[phoneExtension]} | 61,07,45673456,123
  12. I wonder if it's because token_get_all wasn't available when Tracy first tried to scan all the files. I would try deleting the TracyApiData.proceduralFunctions cache (from the debug panel, click the DB icon to open that cache in Adminer where you can delete it) and then do a modules > refresh (although the second step likely isn't necessary).
  13. Never knew this could be disabled on some PHP installs, but a quick google returns this: https://stackoverflow.com/questions/8037245/zend-framework-call-to-undefined-function-token-get-all
  14. To make them smaller ? Seriously though, I don't really know why it is used here. It sounds like compressing and uncompressing on the fly is probably slowing things down and maybe impact opcache: https://tqdev.com/2019-lossless-compression-of-php-files That article does mention obfuscation of source code, which I have seen used on several closed source PHP projects, but for this it doesn't make much sense to me because all the source code is open source. Maybe there is some other reason I am not aware of??
  15. It's just how Adminer / AdminerEvo is compiled from all its source files into this one - it's always been like this AFAIK.
  16. Hi @olafgleba - I really doubt it's related to the table field itself. This is what it looks like for me. If it's not a JS issue, is there any chance you have a module that is somehow interfering with those two fields? Can you try on a fresh PW install with no additional modules and just the table field to test?
  17. Hey @bernhard - I'm not sure the best way to go about this, but you can modify the content of the Tracy bluescreen by either adding an action or a panel - examples here: https://github.com/nette/tracy/blob/1a1cfeb152bd0ccd78d5ce84fba9289094fcabd9/src/Bridges/Nette/Bridge.php#L26 I put together a very simple example of adding a panel with JS that gets executed when the bluescreen loads: $blueScreen = \Tracy\Debugger::getBlueScreen(); $blueScreen->addPanel(function() { return ['tab' => 'RFE Panel', 'panel' => '<script>alert("Hello World")</script>']; }); Perhaps you can use that (or the addAction) approach to inject the JS you need to get things working? I think the problem with Debugger::$customBodyStr and Debugger::$customJsStr is that they need to be set before Debugger::enable() is called which you won't be able to do at the moment. Perhaps a new hookable method could be added to Tracy to support that though. Maybe the other approach is building a panel for Tracy that adds that live reload JS, but it seems like you really only need it added when the bluescreen is displayed, so the addAction or addPanel on the bluescreen might be best. Hope that helps.
  18. Hi @olafgleba - I just tested and everything looks fine here. I am using the latest PW dev and latest Profields Table, but I doubt your older versions are the issue. It looks like a JS error to me with the way the Table row selector and Columns / Order to Export fields are broken. What shows up in your browser dev console?
  19. Hi @MarkE - great point - I haven't come across this, but that's probably because at least in Tracy I have the module itself store page references by path rather than ID. But, I think it would definitely make sense to modify this module to support conversion to paths, but my question is how? I don't think we can realistically check the type of data being stored and know for certain it's a page ID or array of IDs. Sure we could make the assumption that an numbers with 4 or more digits is a page ID and then do a basic check to see if it matches a page. This might be enough, but to make it more robust I think would require parsing the code in the module's files looking for the key in the module settings JSON and determining what type of field it is. I think this could work, but seems a little nuts :) Any thoughts?
  20. Hi @fruid - sorry but I don't know what error you are getting, but also, that line doesn't exist anywhere in my fork, let alone on line 385 :) https://github.com/adrianbj/MarkupSEO/blob/master/MarkupSEO.module
  21. Thanks @szabesz - I did take a look at that and I am hoping that 3.5 years later those 4 devs have now ditched 5.x.
  22. Hi everyone, AdminerEvo was updated yesterday, but the latest version no longer supports PHP 5.x. The fix is simple (it's a null coalescing operator issue), but I am tempted not to push them to support it, but before the opportunity slips by, is there anyone here who really needs 5.x support? I really hope not because if you're stuck on it for some hosting reason, it's time to move :) Let me know.
  23. Maybe still not your thing, but the edit link is now smaller, floated right, and I don't think it takes up any additional space within the inputfield wrapper.
  24. I do the same via admin.less which is nice way to make these sorts of changes - skinning vs a new theme. I did make some quick attempts at a hover approach, but honestly didn't think that took up too much space so didn't persevere too much. I was thinking about a similar approach to the field edit links that AOS adds, but of course the two together get very messy. I'll mull it over and see if I can think of a better solution.
  25. PS I'd love to know whether you have kept the new Adminer field edit links enabled or not - I can see why they might visually annoy some folks, but I am finding them really useful - it's weird how often I actually want to see (and sometimes edit) the raw database value for a field.
×
×
  • Create New...