Jump to content

adrian

PW-Moderators
  • Posts

    10,912
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. Sorry, I shouldn't give advice without really checking into it. This is what you need: $event->arguments[0]->id That will get you the id of the user/page. BTW, the way I figured this out was to bd($event) inside the validEmail() function. With TracyDebugger installed I see this: bd($event, '$event', array('maxDepth' => 5)); Then to confirm, I did this: bd($event->arguments[0]->id); and got this: With the ID you can get the full user object like this: $uid = $event->arguments[0]->id; bd(wire('users')->get($uid)); See all the user fields under "settings"
  2. Sorry wasn't really checking through everything properly. Take a look at how I am doing it for InputfieldPassword::render https://github.com/adrianbj/EmailNewUser/blob/master/EmailNewUser.module#L50 $process = $this->wire('process'); if($process instanceof WirePageEditor) { $userpage = $process->getPage(); if($userpage->is(Page::statusUnpublished)) $event->object->notes = 'NB: Because you chose to automatically generate the password for new users, you can leave these blank. However, if you do enter a password here, it will override the generated one.'; }
  3. Have you tried: $event->object->getPage();
  4. Sounds useful, but I'll wait and see if there is demand. I don't honestly know how many people are using this module anyway, let alone with ML setups.
  5. Ok, I have added the checkbox: Not sure how best to implement this cleanly. If it was a simple matter of checking if there was an additional field at the end of the row that was 1 or 0, that would be ok I guess, but with the CSV field pairing functionality and it's checks, I think it is going to start to get a bit messy, but if you think it would be really worthwhile, let me know and maybe I'll revisit it.
  6. I know this is a little OT (ok, maybe a lot OT), but I just discovered the $sanitizer->testAll() option - maybe you guys all noticed it when it was introduced, but I missed it Anyway, I think it is very handy and a great use of the console panel Finding this I did notice that the list is not complete at the moment though (https://github.com/ryancramerdesign/ProcessWire/issues/2028) Anyway, hope someone finds this useful like I did!
  7. So to clarify, there are time when you wouldn't want newly added pages automatically activated in all other languages? (Sorry not a ML user so not sure how most people work). Do you think it should be checked or unchecked by default? @mel47 - I took a look at the html tag issue - was a very easy fix (just committed) - sorry I hadn't come across this before. I was sanitizing as "text" - now I am using the "purify" sanitizer - hopefully that will work for everyone in all scenarios, but if anyone notices a problem, please let me know.
  8. Sorry for the crazy delay on this @Soma but I think it should now all work as expected. Would there be any reason to make this a config option? Would anyone not want new pages to be automatically activated? Could it be a module-wide setting, or would it need to be part of the interface where the new pages are added?
  9. I am switching my test install between 2.x and 3.x all the time for module development and have had no problems (I use the version switcher in Tracy). The data schema is unchanged. The only changes I can think of are one from text to mediumtext for the SessionHandlerDB module and the addition of a published field in the pages table (but this may have actually happened in 2.x - I don't recall).
  10. Minor column width / padding issue
  11. @Karl_T - I think your PHP7 issues should be fixed with the latest version. Please let me know if you find anything else amiss. @mel47 - any chance of that test file that you are trying to import?
  12. There are no namespaces in 2.8 - otherwise it is identical to 3.x. 2.8 is designed as an ideal upgrade for already live 2.x sites. $dmcs = wire('pages')->find("template=dmc, DMC_represented=1, sort=DMC_country_represented, sort=parent.title");
  13. This is reminding me of this post: Try adding the sort to your selector. Not sure if we have a weird bug going on here. Would be good to know what version of PW @bmacnaughton is running and also if you have the same problem on 2.7.3, or 2.8.x or 3.x
  14. Yeah - sounds like it must have been an error in the code you typed. Just to clarify - you are back on 2.9.2 now and it's working fine in 2.9.2?
  15. Works here. What error are you getting?
  16. Hi @Karl_T and @mel47 - I am very sorry for the lack of response here. I have been low on time lately and spending most of it on TracyDebugger. @mel47 - I'll look into the html tags being lost on import - any chance you could PM me the file you are trying to import? @Karl_T - I know what the issues will be - just need to set myself up with a PHP7 testing environment and track them all down. I'll see what I can do about getting both of these taken care of this week. Thanks for your patience.
  17. Hey @Peter Knight - I haven't used this module, and I know you said it is working on identical servers, but I would still start by updating the module (https://github.com/ryancramerdesign/LoginNotifier/blob/master/LoginNotifier.module#L102) to use wireMail (https://processwire.com/api/ref/mail/send/) so you can make use of SMTP, rather than php's mail() which can problematic for a variety of reasons.
  18. I gotta say, I am super-impressed with the effort you have put into the settings for this module - so user friendly and beautiful! I have actually been thinking about adding user-roles for some panel permissions in Tracy and having a nice, compact, and functional settings interface like this would be exactly what is needed. After that glowing compliment can I say one negative thing I do wonder about the greyed-out checkboxes - they look to me like they can't be checked (disabled), rather than just not checked. It even affects the module uninstall checkbox which actually uses this visual cue to let you know that it can't be uninstalled.
  19. A few more updates to the Module Disabler. The "restoremodules.php" script now works without bootstrapping PW, so it will work even if a disabled module has resulted in a fatal error. Also added restore instructions to the panel.
  20. I have spent some more time on the Module Disabler panel to make it easy to restore things if disabling a particular module breaks your site. Ryan has mentioned that there are some situations where this may happen and there is no way to avoid it, so I think this panel is now the safest way to disable modules for testing purposes. Whenever you disable any modules, a backup of the "modules" database table is automatically saved. To restore you have two choices: Copy "/site/assets/cache/TracyDebugger/restoremodules.php" to the root of your site and load it in your browser OR Execute "/site/assets/cache/TracyDebugger/modulesBackup.sql" manually (via PHPMyAdmin, the command line, etc) After you run the restoremodules.php file, it will automatically remove the backup file and itself from all locations. Please let me know if you notice any problems or have suggestions for improving this.
  21. I am sorry @Dakrtom - now you have completely lost me
  22. Just been toying around with this a little more. You can now backup the settings for any module anytime you want using the "Backup Current Settings" button. You can also "Restore Settings from Backup" at any time. By default it automatically backs up the settings of any module when it is uninstalled, but you can turn this off if you want. Even with it on, restore on reinstall still has to be manually triggered anyway, so probably no real reason to turn off. And of course you can still manually import settings that you have pasted in from another install. Anyone have any further thoughts? In particular I am looking at @tpr (AOS) and @horst (ALIF) because they are the two module authors who I know have built some sort of dedicated settings backup / migration into their modules. Do you think it would be weird having this module installed and adding this functionality on top of what you have already built into your modules? I guess ideally if this functionality was in the core it wouldn't be an issue because you'd know that everyone has access to it, so no need to build it in.
  23. No problem - thanks for the explanation. Seems like one of those rare times I can see a valid use for the silence operator. I think I'll add it to all the strtotime calls in Tracy which should at least prevent the error for you.
  24. Thanks @gmclelland - but I have been running 3.0.33 for a couple of hours now also and not seen this. Looks like an ajax error - any chance you could look at the network tb of the dev console and see if you can find the error?
  25. Thanks - I wasn't sure what was used (I should have looked at your previous post) - I always use gtmetrix so just went with that.
×
×
  • Create New...