-
Posts
10,898 -
Joined
-
Last visited
-
Days Won
348
Everything posted by adrian
-
@kongondo and @Robin S - can you please try the attached version to see if that fixes those errors on Windows please? ProcessTracyAdminer.module
-
I have this fixed in the Adminer panel version, but struggling to get it sorted in the Setup > Adminer version. Not sure I'll get this sorted tonight before I leave I'm afraid. I'll just leave it this way for now then - will tweak when I am back if needed.
-
Done, although just realized I should tweak this so that the PW menu system is retained - coming soon ? I'll look into this shortly.
-
Quick note to let you know that it's also possible to run Adminer directly via: /processwire/setup/adminer/ which may be preferable if you have lots of work to do and want it open in a more "permanent" way. At the moment I set the page as hidden so it actually won't appear under the Setup menu - I can change this, or perhaps I can have a link from the Adminer Tracy panel to open it this way. Any thoughts on which would be best?
-
Just released the new Tracy Adminer panel: https://processwire.com/talk/topic/12208-tracy-debugger/?do=findComment&comment=175420
-
New "Adminer" database GUI panel just added. A huge thanks to @Robin S for making me take another look at this long forgotten tool and for helping with many suggestions regarding the implementation in Tracy and debugging several issues. There is one outstanding one on his local Windows dev setup that I can't reproduce at all and he also isn't seeing on a live server. He is getting session_start / headers already sent error. Could someone else on Windows (maybe @bernhard) take a look and let me know if you have the same problem as well. Actually Robin - any chance you are running the SessionHandlerDB modules on that local setup? The color scheme is configurable in the Tracy settings. I have used this already on a live server to help debug something and it would have taken much longer to go find the cpanel credentials, and navigate my way to PHPMyAdmin. This logs you in automatically and is virtually instant. I am away for the next 10 days so if you find any problems, they will most likely have to wait till I'm back. Hope you find it useful!
-
-
There is a hacky way around this. This comes direct from the ready.php file from one of my sites - in this case it's for the autocomplete inputfield, but maybe something like this would be useful for you also? // hack to overcome this: https://github.com/processwire/processwire-issues/issues/550 $this->addHookBefore('Pages::find', function(HookEvent $event) { $selector = $event->arguments(0); if(is_string($selector) && strpos($selector, 'template=user') !== false && strpos($selector, 'name|first_name|last_name%=') !== false) { $selector .= ', check_access=0'; } $event->arguments(0, $selector); });
-
I agree the current approach isn't great, but is it possible to simply add "/site/assets/MyModule" to the ignore list. Doesn't that achieve what you want? If not, I'd certainly be happy for a regex approach.
-
Not sure if that's the best approach ? With page reference fields I think you want to go with a custom selector and add "check_access=0" to the selector.
-
Create Field from API and give read-access only to superusers
adrian replied to markus_blue_tomato's topic in General Support
@tiefenbacher_bluetomato - Just a quick note to say that I just pushed another revised version that fixes a bug in the previous one, so please be sure to update if you want to use this feature. -
Create Field from API and give read-access only to superusers
adrian replied to markus_blue_tomato's topic in General Support
I have just added access rights to TracyDebugger's RequestInfo > Field Code section. It now contains: [ 'type' => 'FieldtypeText', 'flags' => '32800', 'name' => 'my_field_2', 'label' => 'My Field 2 Label', 'collapsed' => '0', 'minlength' => '0', 'maxlength' => '2048', 'showCount' => '0', 'size' => '0', 'tags' => '', 'editRoles' => [ 'editor', ], 'viewRoles' => [ 'author', 'editor', ], 'textformatters' => '', 'showIf' => '', 'themeInputSize' => '', 'themeInputWidth' => '', 'themeOffset' => '', 'themeBorder' => '', 'themeColor' => '', 'themeBlank' => '', 'columnWidth' => '100', 'required' => '', 'requiredAttr' => '', 'requiredIf' => '', 'stripTags' => '', 'placeholder' => '', 'pattern' => '', ] which is everything to need to create a field via the API including the view and edit restrictions. You can then simply wrap this output in: $f = new Field(); foreach() $f->save(); so that you have: $f = new Field(); foreach([ 'type' => 'FieldtypeText', 'flags' => '32800', 'name' => 'my_field', 'label' => 'My Field Label', 'collapsed' => '0', 'minlength' => '0', 'maxlength' => '2048', 'showCount' => '0', 'size' => '0', 'tags' => '', 'editRoles' => [ 'editor', ], 'viewRoles' => [ 'author', 'editor', ], 'textformatters' => '', 'showIf' => '', 'themeInputSize' => '', 'themeInputWidth' => '', 'themeOffset' => '', 'themeBorder' => '', 'themeColor' => '', 'themeBlank' => '', 'columnWidth' => '100', 'required' => '', 'requiredAttr' => '', 'requiredIf' => '', 'stripTags' => '', 'placeholder' => '', 'pattern' => '', ] as $k => $v) { $f->$k = $v; } $f->save(); So to get this to work, create a field via the PW admin and set it up exactly how you want with the access restrictions, then go to the RequestInfo panel and copy the array from the "Field Code" section. Note that this section is not turned on by default when you install Tracy, so you will need to go to the config settings for the RequestInfo panel and turn it on. -
Congrats Margaret on getting this up. PW makes a great tool for conference websites, especially for setting up conference schedules/programs using repeater fields:
-
Just wanted to let you know, that this will no longer be a problem. I have removed the code that cleared the sticky panels cookie when saving the config settings. I'll keep an eye on things because I am still not sure exactly why I added it in the first place, but it's definitely annoying ? On another note, core modules and site modules classes are now optional available in the API Explorer panel, along with lots of other improvements.
-
Questions and Answers forum desperately needed. AKA mark as solved.
adrian replied to dotnetic's topic in Wishlist & Roadmap
I agree - I am not saying that something like it shouldn't be implemented - just wanted to expand on @kongondo's answer and explain what we found about it that didn't work well, and the way it was, it really wasn't helpful. Maybe Ryan could reconsider it (or another similar approach) with the website revamp. -
Questions and Answers forum desperately needed. AKA mark as solved.
adrian replied to dotnetic's topic in Wishlist & Roadmap
If my memory serves, it was because it ruined the flow of the thread. In a lot of cases we are not looking for a single "best answer", but rather it's a discussion of different approaches. That said, it obviously works pretty well on StackOverflow so I think it's something to consider again, but I don't know which boards should use it and which shouldn't and I think that was part of the problem with the attempted implementation at the time. -
Selectors can only be strings, newlines make selectors buggy
adrian replied to theoretic's topic in General Support
You might find what you need in this post: https://processwire.com/talk/topic/19024-selector-arrays-with-page-reference-fields-with-and-not-or/ -
Thanks for doing that test. Now the problem is that I am not really sure what to do. You do have the option to change what tabs are output: so I guess if you're coming across this a lot and don't want to (or can't increase) the PHP memory limit, then perhaps the best option is to drop back to one tab. Would you mind confirming that works for me?
-
Would you mind checking what is the last old version of Tracy that doesn't have an issue with that hook in your setup? If there has been some change, I'd love to help sort it out. Perhaps it's when I introduced the debugInfo / Iterator / Full Object tabs in the dumped results? This is the commit where this was first introduced: https://github.com/adrianbj/TracyDebugger/commit/104a9457ec1eae78b46d139a631f798b2a042bf0
-
Hi @Zeka - I think is probably just a result of trying to bd() lots of complex PW objects. Try replacing the bd call with bd($e->object->title) and see if that helps. Or maybe you could use bd($e, [1]) as a shortcut to reduce the maxDepth of the dump. The main thing is I don't think it's a problem with Tracy but rather just how much content is being dumped. How many bd() calls are being made in this hook in your setup?
-
Inline with my last comment, I am thinking about adding an alert (with orange icon) when there are new properties/methods available after you upgrade to a new version of PW. Haven't decided on the exact interface yet, but if you like the idea and have any thoughts, feel free to suggest, but probably a simple note at the top of the panel detailing those new options and also highlighting in the tables. Probably with an option to "acknowledge" that you've seen the options to remove the notice. Something like that anyways.
-
New post: Rebuilding processwire.com (part 2)
adrian replied to ryan's topic in News & Announcements
Me too! -
New post: Rebuilding processwire.com (part 2)
adrian replied to ryan's topic in News & Announcements
Thanks @ryan - excited to see it. Regarding the new "numParents" method/property, you are missing the @property in the Page.php doc comment. -
I can confirm that today's updates have fixed the Profields Table field error I was getting. Not sure about the PHP <7 errors though as I am on 7.