Jump to content

adrian

PW-Moderators
  • Posts

    10,896
  • Joined

  • Last visited

  • Days Won

    348

Everything posted by adrian

  1. They are just pages behind the scenes and unpublishing would work if Ryan would fix the 2048 vs 2049 issue, although I guess at this point it might be a breaking change. Did you try: $item->addStatus(Page::statusUnpublished); $item->removeStatus(Page::statusOn);
  2. Yeah, I am sure I can sort out the Pluralize issues. Of course the really simple solution here would be keep the field settings even with the create field checkbox unchecked - this way nothing else would need to be changed - you'd just use the field label as the way to generate all the other things. It would work well, but would be a strange / confusing interface.
  3. I've definitely done that before as well, so you're not the only one ? You're right that it kinda makes the module name a bit weird, but then it's always been a bit of a mouthful anyway. The thing is I am not sure what would be the most logical way to support this - everything is pre-populated based on the field label and its plurality. I am thinking that there should be a "Create Field" checkbox in the field settings that is checked by default, but if you uncheck, the field settings are hidden and the form starts at the "Page Settings" fieldset where you need to manually enter the Parent Page Title and that is used to automatically populate the parent and child template field lables/names (rather than coming directly from the field label? Any thoughts?
  4. Thanks for your thoughts @teppo - I agree it's not a simple problem to solve and that there are some gotchas for sure. However I feel like if some assumptions are made, it could be made to be functional. Firstly, if only supported first level pages (those directly under home), we could simply strip off everything after the second forward slash and assume those are urlsegments and simply find the page that matches the ID of the page whose name was changed and then re-append all those segments as they were in the original URL. I know this wouldn't solve the problem for all setups but I bet it would handle most. I think this discussion should be continued here: https://github.com/processwire/processwire-requests/issues/338
  5. Hi everyone, I haven't really used this module much before, but just came across something that I thought should work, but it doesn't seem to. This works: But this doesn't: which of course means that if someone changes the name of the "buy-now" to something else, not only do I need to add a new jumplink from "buy-now" to the new name, but I also need to remember to change the destination for the initial linking from "/subscribe" to the path of the renamed page. Is there any reason the "page:1495" format can't also work when using wildcards? Just in case it's not clear, {all} represents a PW url segment. Thanks for any thoughts. OT, but I was actually a little surprised that the core PagePathHistory module doesn't try to handle paths with urlsegments - I know it's not simple, but I thought it could try to strip back a segment at a time to try to find the actual page and redirect to the stored ID.
  6. By toggle off, I assume you mean "unpublish"? It's possible, but it's a real mess. However if you read through this: https://github.com/processwire/processwire-issues/issues/36 you'll be able to get it working.
  7. Your live server must have readfile() disabled - you can check with var_dump(ini_get('disable_functions')); The fact that Tracy is using the 2.5 version of the core also suggests that the live server is using an old version of PHP so I am wondering about how good the host is.
  8. By "analyze both", do you mean the stack trace and also some other bd() call? Not sure I quite follow.
  9. I guess my suggestion above is not really much different to just throwing an exception so maybe that's not what you are looking for. Maybe I could capture the output via output buffering and push that into the dumps panel? Is that more what you are thinking?
  10. @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.
  11. 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.
  12. 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.
  13. 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?
  14. 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
  15. Do you still need to modify the js file if you install https://github.com/aik099/PhpStormProtocol ?
  16. 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.
  17. 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.
  18. 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.
  19. Thanks @Jens Martsch - dotnetic - I just want to ping a few other Windows users: @Robin S @bernhard @tpr to get their experience with this.
  20. 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.
  21. 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?
  22. 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.
  23. 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)); }
  24. I am doing it simply like this: $page->template->urlSegments = 1;
  25. Also make sure that the "data" field/column in the field_body table is set to utf8mb4
×
×
  • Create New...