-
Posts
11,263 -
Joined
-
Last visited
-
Days Won
374
Everything posted by adrian
-
@bernhard - can you please try adding these to a template file where you want to see a debug_backtrace() and let me know if it satisfies your needs: $blueScreen = new Tracy\BlueScreen; $blueScreen->render(new Exception); If you think that works OK, I'll setup a trace() shortcut.
-
I like the idea - just not sure if it's possible with the core of Tracy as it currently is because I think some of the methods I'd need to use are private. I had a quick attempt and came up against these, but I'll try again later. Remember PW has a new bd(Debug::backtrace()); method you can use, but of course it returns an simply array, the same as PHP's debug_backtrace(), so I know it's not what you are looking for.
-
I am noting that you can only use or the other - you can't combine exclude and include. So the AND/OR is within each option, not between. I think it's the typical AND/OR issue when you're using the (!) NOT operator - you need to switch from OR to AND. So, the selector for exclude is: roles!=1021, roles!=38 And the one for include is: roles=1021|38 Anyway, I have committed a new version with this functionality - please test and let me know how it goes.
-
Hi @Robin S - happy to add this. Just playing around with it now and I guess the main issue is that when "including" we need to go with "OR" when matching users to roles, but I think we still want "AND" with "excluded (restricted) roles". Because you want to be able to include different admin roles but not require the users to have all these roles. But if you want to exclude/restrict like the current behavior, then you want to exclude all users with any of the selected rules. Does that seem like the correct behavior to you?
-
Thanks for the explanation @Jens Martsch - dotnetic - I wonder if you'd be willing to submit a PR with changes to https://github.com/adrianbj/TracyDebugger/blob/master/docs/configuration.md that detail your approach? Thanks, Adrian
-
Do you still need to modify the js file if you install https://github.com/aik099/PhpStormProtocol ?
-
I think rather than using that custom syntax, it maybe makes more sense to install the protocol handler that @bernhard linked to. Actually, I just noticed that in the Tracy settings I was linking to a protocol handler for PHPStorm, but it was Linux only, so I have linked to the one bernhard mentioned instead.
-
Hi everyone, Sorry for the silence on this thread. This module is now generously being managed and updated by @wbmnfktr - I have updated the modules directory entry to point to his fork. I am sure he will be able to better support and improve this module than I can.
-
Error on module Login/Register when enter a wrong password
adrian replied to WireCodex's topic in Modules/Plugins
Unfortunately my version doesn't just contain fixes but I've also hacked it to handle redirection to payment and lots of custom changes to the user's profile based on specific things to the site I am using it on. This is the first time I have used this module and unfortunately I don't think I'll be using it again - I know there are hooks to add custom behavior but they just aren't flexible enough and there are also just too many broken things. -
Thanks @Jens Martsch - dotnetic - I just want to ping a few other Windows users: @Robin S @bernhard @tpr to get their experience with this.
-
Error on module Login/Register when enter a wrong password
adrian replied to WireCodex's topic in Modules/Plugins
In my version of this module I have changed so many things that it is almost unrecognizable, but I do see that I added: if($user) to the beginning on line 394 which should fix what you are seeing. -
Hey guys - just wondering if you have read this page: https://tracy.nette.org/en/open-files-in-ide Does that help at all? What do you guys need me to do (if anything) to get things working more easily within Tracy?
-
Not sure - I didn't rely on the output from Tracy - I just reloaded the page and looked at the created user on the Settings tab and it seemed to stick just fine. Curious to see what happens when @hus tries it.
-
Just to follow up on Dragan's code. To change the user via the API, you don't actually need to check the "allow the created user to be changed on pages" option. I would also perhaps recommend a quiet save so that the modified date is not changed, eg: $page->created_users_id = 1033; $page->save('created_users_id', array('quiet' => true)); You can do this in the Tracy console while viewing or editing a page in the admin - $page refers to the current page being viewed or edited. For doing this on multiple pages: foreach($pages->find('myselector rules') as $p) { $p->created_users_id = 1033; $p->save('created_users_id', array('quiet' => true)); }
-
I am doing it simply like this: $page->template->urlSegments = 1;
-
Also make sure that the "data" field/column in the field_body table is set to utf8mb4
-
Have you set: $config->dbCharset = 'utf8mb4'; in config.php?
-
Done! $this->wire('bd_host', $host); results in: I decided to add the $ and keep the "bd_" prefix in the title to help better identify it as an automatically dumped wire variable. Let me know if you have any suggestions for improvements.
-
@Robin S - what do you think about this idea - I am contemplating having Tracy check $wire for any variables prefixed with "bd_" and automatically bd() them without the need to manually make a bd() or d() call. The title would be automatically set to the name of the variable after the "bd_" prefix. PS - remember you can set $wire variables like this: $this->wire('bd_host', $host); The shorter the better when adding debug statements ?
-
Really great idea @Robin S ! You can make it even less work by using d($td_host) in the Console panel:
-
How about this: <?php $p = $pages->findOne(1241); if ($p->id) : ?> <a href="<?php echo $p->url() ?>"><?php echo $p->title() ?></a> <?php endif; ?> Perhaps it's only a minor optimization, but it saves it returning any page object if the page isn't published. Be sure to read the docs on findOne() vs get() to understand fully, but basically find() and findOne() won't return unpublished pages unless to specifically request them to, but get() will ignore unpublished and hidden statuses and always return a page if everything else matches.
-
Hi @xportde - sorry about that. I have reverted those changes and taken a different approach to what I was trying to fix. FieldsetPage fields now work as expected, but there is still a problem with the individual fields under a textareas field, but I don't think that is related to the version of this module - I just don't think the Textareas module supports setting "entityEncodeText" to false, which is how this module allows html in the description. If I am correct in this assumption, then it is something Ryan will need to fix. Let me know your thoughts.
-
Using recursion to find a parent? Suggestions orther than recursion?
adrian replied to John W.'s topic in General Support
Couldn't you use this, assuming all offices, eg HUMAN RESOURCES have a template names "office" $page->parents('template=office'); Actually you might want "parent" instead of "parents" to make it easier in this case. -
Using A Child Templae As URL Variable, Without Loading the Child Page
adrian replied to John W.'s topic in General Support
@John W. - I understand the way the documents template works - to load a summary list of documents, but I still don't understand the problem with PW trying to load the individual document when the document is in the URL - how do users end up with the document component in the URL and what are they supposed to see when it is?