Jump to content

adrian

PW-Moderators
  • Content Count

    9,017
  • Joined

  • Last visited

  • Days Won

    306

Everything posted by adrian

  1. adrian

    SeoMaestro

    @Wanze - I am curious if you would be willing to adjust the inheritance model a little. I am looking to be able to have site editors set the OG image on the homepage and have it inherited by all other pages unless they specifically upload an image to another page. Currently the only way I can see to do this is to set the field's main default image to the URL of an image that is uploaded to the homepage, which means the editors need to explicitly name the image so the URL is always the same. I think it would be great if pages inherited values from their parent pages, rather than just directly to the field's default values. Does that make sense and sound useful? Thanks!
  2. @Mike Rockett - I am seeing entries appearing the on the 404 Monitor tab that are actually being properly handled and redirected by PagePathHistory. I am wondering if it's a matter of adjusting the load priority for the Jumplinks module relative to PagePathHistory, or if there is more to fixing this, but it would be great if they weren't being recorded. Any thoughts? Thanks!
  3. adrian

    WireMailSmtp

    I'll defer to horst on the troubleshooting of it actually sending. I am just talking about the deliverability issues you are likely to deal with. If the emails are only to site editors/staff you may be ok, but if they are being sent to site users then it's likely going to be an issue at least in my experience. Maybe others will disagree?
  4. adrian

    WireMailSmtp

    Unfortunately this is probably a path to disaster these days - spam has made email painful and I think the only reliable option these days is to go with a transactional email service like MailGun, Postmark, SendInBlue etc. And be sure to spend the time to learn about and properly implement DKIM, SPF, and a DMARC policy.
  5. Wow - another post about this - I deleted one already 🙂 Please see my response here: https://processwire.com/talk/topic/4388-phone-number-fieldtype/?do=findComment&comment=193502 about how to set values for FieldtypePhone fields.
  6. Ok, so I found the source of the problem: https://github.com/processwire/processwire/blob/4e4b3afdcbe9aef27d03170dab64dc6e8e6c5a4d/wire/modules/Process/ProcessPageLister/ProcessPageLister.module#L1100-L1106 Lister (the base version in the core) checks to see if a test page is editable but it doesn't ever set the parent: // determine how many templates are editable $test = $this->wire('pages')->newPage(); foreach($templates as $template) { $test->template = $template; $test->id = 999; // required (any ID number works) if($test->editable()) $numEditable++; } Without knowing the parent, when AdminRestrictBranch hooks into editable() it has to return false. If you want to test this out, add: $test->parent = xxxx; where xxxx is the ID of the branch parent you are restricting to - with that in place, you won't need the ProcessPageLister::getSelector hook. I feel like that code in Lister is a bit hacky and will cause problems with lots of modules that hook into editable(). I am not sure this is a good way for me to workaround this. Perhaps I could have an option in AdminRestrictBranch to automatically add this hook: $this->wire()->addHookBefore('ProcessPageLister::getSelector', function($event) { $event->object->allowIncludeAll = true; }); rather than having to add it manually. But I still think it's really weird that for Lister to work as expected you can't rely on inherited template edit permissions in the first place. Although this reason for this is obviously the lack of parent for the $test page - it can't rely on inherited permissions because it doesn't have a template to inherit from.
  7. I see that too but it's weird to me that access permissions aren't inherited from the home template in this case. Why should we have to explicitly set permissions for the specific template for this to work? Do you agree or am I missing something? Thanks, I can also confirm this - will see if it's fixable.
  8. @JeevanisM - I don't know why the integer phone number isn't working, but for the phone number field you have to set the subfields separately, eg: $u->Phone->country = 944; $u->Phone->number = 6196667; or if you have the field set up to keep the area code in a separate subfield: $u->Phone->country = 944; $u->Phone->area_code = 619; $u->Phone->number = 6667; and don't forget to use the field's formatting options to style the output how you want.
  9. adrian

    WireMailSmtp

    That debug code also works perfectly in the Tracy console 🙂
  10. You're a legend - thank you - works perfectly!
  11. Thanks @Mike Rockett - the {!all} does the trick, but thanks for looking into updating the cleaner! Thanks for the superfast response!
  12. Source: subscribe/{all} Destination: [[1495]]{all}
  13. I just removed all those calls and it doesn't seem to be coming from them as it didn't help. Actually, those calls only seem to be in the import from csv logic, so I don't think they are relevant at all, are they?
  14. Thanks very much - let me know if you have any trouble reproducing.
  15. adrian

    HTTP/2 Push

    I was thinking that the PW admin could push its js and css assets, but as I mentioned above, it does seem like there might be some caching issues with "push", so maybe it's not worth worrying about and just stick with swapping to http/2 and making sure that the ALPN extension is enabled?
  16. So just to confirm, do you agree that this module isn't having any impacts on the issue?
  17. @Mike Rockett - I've come across an issue with the way that Jumplinks sanitizes the URL. I have partners linking in to the site with campaign info in the query string, but Jumplinks is removing the "?" so that: mysite.com/subscribe/partner/?utm=123 becomes: mysite.com/sign-up/partner/-utm-123 which of course looks like a second urlsegment to PW and therefore breaks things. Any chance of revising the sanitizer that makes that change please?
  18. @Kiwi Chris Just looked at one of my sites and this is what I put in ready.php // lets non superusers view unpublished and hidden pages in listers // https://processwire.com/talk/topic/9346-not-all-specified-templates-are-editable-only-includehidden-is-allowed/?do=findComment&comment=143068 $this->wire()->addHookBefore('ProcessPageLister::getSelector', function($event) { $event->object->allowIncludeAll = true; }); Does this solve your problems?
  19. I see that notice with non-superusers even without this module installed. Have you tested with the module uninstalled, disabled, or with a user with no restricted branches?
  20. @Kiwi Chris - even on a site without this module installed, I have to do this for users to see unpublished pages in ListerPro: Does that help?
  21. Yep, because of the way this module works, it can only limit to one branch of the tree. This limit affects all places where the user could view and/or edit pages outside that branch. If you want to give access to multiple branches you'll need a different approach - this thread might be helpful:
  22. adrian

    HTTP/2 Push

    Hi all - I just wanted to start a discussion about using push with http/2. @teppo's recent post here (https://processwire.com/talk/topic/5630-module-aiom-all-in-one-minify-for-css-less-js-and-html/?do=findComment&comment=193086) got me to finally move all my servers to use http/2 which is great, but it seems like there is much more to it than that. There are a few articles of interest: https://www.smashingmagazine.com/2017/04/guide-http2-server-push/ https://www.keycdn.com/blog/http-preload-vs-http2-push https://jakearchibald.com/2017/h2-push-tougher-than-i-thought/ but I'd love to hear what everyone is actually doing on their sites and also wondering if the PW core should try to push certain assets. There seem to be issues with browsers not caching assets when push is used and I am wondering whether in general you should push everything needed for a page, or ? Thanks all! PS - if you're wanting to upgrade your Debian or Ubuntu servers, this is a good guide: https://blog.samuel.domains/blog/tutorials/how-to-enable-http2-on-apache-debian-9 - I am running Debian 10 and PHP 7.3 so just replace the references to 7.0 to 7.3 and you'll be good.
  23. Thanks @sz-ligatur for those screenshots - you are confusing two different features here. The use of "snippets" is probable confusing things here. The snippets that can be stored in that linked js file are autocompletion snippets triggered automatically when typing in the ACE code editor that the Console panel uses. I think for your purposes you should be using the SnippetRunner panel (https://adrianbj.github.io/TracyDebugger/#/debug-bar?id=snippet-runner) and storing each snippet and a separate *.php files under either: /site/templates/TracyDebugger/snippets/ /site/assets/TracyDebugger/snippets/ Does that help explain things?
  24. @sz-ligatur Can you show your snippets file? It should look like this: https://cdn.rawgit.com/adrianbj/f110cf9cc10b455d4d794c18f128b2fd/raw/34b6fc02e0e6c4a3a6d6668c35110bf44005d562/tracy-snippets.js which as you can see defines getCustomCodeSnippets()
×
×
  • Create New...