-
Posts
11,217 -
Joined
-
Last visited
-
Days Won
373
Everything posted by adrian
-
Hey @tiefenbacher_bluetomato - unfortunately I can't help with that - I think we need @Pete's permissions to sort that out.
-
Well given that I am not a coffee drinker, I actually think this is cooler ? I am actually thinking of making this available to site editors, not just Tracy users - it's so nice knowing which version of a site each tab is!
-
How to get the Requested Page URL that ended in a 404?
adrian replied to wbmnfktr's topic in General Support
Not sure I really recommend it, but you could take a look at: http://modules.processwire.com/modules/process404-search/ It parses the URL from $_SERVER['REQUEST_URI'] and returns search results that match the url segment. Keep in mind that if anything, it is recommended to have a static 404 page, rather than one that does even more db queries: https://processwire.com/blog/posts/optimizing-404s-in-processwire/ -
Something I've been wanting to add for a long time. Favicon server indicator badges. These show the first two letters from the subdomain / tld settings you have configured in the Tracy settings along with the configured colors. This is a new option available from the Server Type Indicator settings section: Just another attempt to help you from accidentally working on the wrong version of a site. Please let me know if you guys find any problems with it.
-
I used to be all about sending via SMTP, but it seems to be getting harder and harder to find a service that doesn't end up screwing you with limits at some point, or they decide you're spamming, or the deliverability is compromised. I have become a big fan of MailGun - should be free for your needs and the PW MailGun module works great - it's also faster than sending via SMTP. Be sure to grab @Macrura's new fork of the module from: http://github.com/outflux3/WireMailMailgun/
-
Selector arrays with page reference fields with AND, not OR
adrian replied to adrian's topic in API & Templates
Just a follow up in case anyone is interested. On a separate project I needed to get into grouped OR selectors and I decided the easiest way is to create a standard array and simply do an implode on it, eg: $selector = []; $selector[] = 'user_types='.$u->user_type; $selector[] = 'ages=(ages.count='.$pages->count('template=age').'), ages=(ages='.$u->age).')'; $selector[] = 'sexes=(sexes.count='.$pages->count('template=sex').'), sexes=(sexes='.$u->sex.')'; $selector = implode(', ', $selector); This is back to how I used to do things and I feel like this is almost as clean as the selector array approach and so much more flexible. -
Sorry, that was my fault - fixed now!
-
Yeah, this is a little painful. I use the same approach in Tracy. I think it might be better if Ryan replaces that json detection code with the following which seems to be the most common approach to problem. /** * is the provided string a valid json string? * * @param string $string * @return boolean */ public function isJson($string) { json_decode($string); return (json_last_error() == JSON_ERROR_NONE); } PS - actually maybe this isn't useful at all with this issue, but in general I think he should be using a function like this for determining if a string is JSON.
-
Maybe something useful in this thread? https://answers.microsoft.com/en-us/msoffice/forum/all/mailprotectionoutlookcom-is-rejecting-my-mails/5a6bb9e0-062c-44e0-8a60-d79959bc003e
-
-
PS - when you have found the field in question, check out the Field settings in the RequestInfo panel to see if there are any textformatters showing there that are null or empty or something.
-
Have you tried: bd($textformatter, $field->name); so you can see which one at the end there is returning null? If you know the field affected, you might be able to check which textformatters are assigned to the field and find the problem that way.
-
Probably not enough ? Glad you're finding the API Explorer and Adminer useful. I use them both all the time. Sorry about that issue with the File Editor panel - just a stupid typo! It should be fixed in the latest version. Please let me know if it works for you now.
-
Someone else once mentioned that he didn't get the console errors in the response tab - turns out he didn't have "Disable Cache" checked on the Network tab and apparently that made a difference. I always have it checked because Chrome caching drives me crazy but this might be a helpful hint for others.
-
It looks like there is a PHP error message breaking the JSON - in your dev console click on the image upload ajax call (Network tab) and go to the response tab.
-
Hey @diogo - nice work! One thing I noticed is that it is loading quite slow for me. Several quite large images on the homepage.
-
Also, on https://processwire.com/docs/fields/dependencies/ you have a couple of links to the form builder module, but these are linking to http://modules.processwire.com/modules/form-builder/ instead of the new https://processwire.com/store/form-builder/
-
@ryan - not sure how many of these there are, but I think there are possibly lots of broken links from the PW admin to the new website, for example: The "how to use this" 404s.
-
@ryan - unfortunately the reply nesting / order of comments on the blog posts has been messed up during your import to the new site which makes things hard to follow. it would be great to get these reimported in the correct order and with the correct parent comments.
-
That makes sense - thanks. Emails are sent just fine. I registered a mg.mydomain.com domain with Mailgun and if I use that in the module settings without dynamic domains, then everything works as expected. I think it's simply because of the "value" parameter that is set in the WireMailMailgunConfig.php file. Actually speaking of the config settings, I think most of those checkbox settings should really have a value of "1" if they are to be checked by default, rather than the name of the field. Also, not sure what you think of the current approach to defining those module settings, but personally I prefer this approach (https://github.com/adrianbj/CookieManagementBanner/blob/master/CookieManagementBanner.config.php) if you want a separate file. No big deal either way - just seems cleaner to me.
-
@novajones001 - as far as I know, there are no books on the PW API - it sounds to me like you're not even talking about the PW API specifically. Are you sure you're in the right place ?
-
Hey @Macrura - admittedly I haven't looked into this dynamic domain stuff much, but from what I can tell, I don't think it should be checked by default. With my setups it prevents emails from being sent. What do you think?
-
Good news that solved that issue, but the way wire mail is called in the module is still problematic and needs fixing.
-
It's probably because that module uses: new WireMail() https://github.com/ryancramerdesign/LoginRegister/blob/7e6395393d46f9fba3a6769cc2ce85d4e495b8a4/LoginRegister.module#L677 rather than: wireMail() or $mail->new() Docs here: https://processwire.com/api/ref/wire-mail/ That causes PW to use its core email sending, and prevents wireMailSMTP and other mailing modules from working. I think this is a critical bug in this module which needs attention. Can you please report here: https://github.com/ryancramerdesign/LoginRegister/issues
-
@abmcr - great that you've fixed it up, but I think it would be helpful to submit a PR to @Pete so that everyone will get this new version. Please note that this module doesn't currently send proper 503 maintenance mode headers which is why I always use the protected mode module for this. Perhaps you could take care of adding the 503 stuff to this module as well?