Jump to content

netcarver

PW-Moderators
  • Posts

    2,236
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by netcarver

  1. Yay! Thank you, @FireWire looking forward to trying this out later.
  2. @Leftfield Got to run now, but can you check what your session.cookie_lifetime setting is (just in case it's this for you?)
  3. Welcome to the plugin-author's club, @Leftfield!
  4. Hi @maximus, welcome to the forum. Are any webp image variations actually being generated by ProcessWire? You can check either in the admin interface on the page with the image field, or by looking in the site/assets/file/<page-id>/ folder for .webp variations of any image you saved to the page with id <page-id>
  5. The front-end seems to work fine for me using Firefox - on the old and new sites (although you have a trailing ')' character in the new site URL you posted above.) Can you give post a set of steps to reproduce the issue? Does the error occur only in the admin interface or once users are logged in? Hmm, an error 429 is the HTTP server telling you there have been too many requests, and that it's rate-limiting you. What plugins have you got installed and activated?
  6. Hi @DrQuincy I think you can do this by hooking in to PW's login flow. Here's how I'd attempt to do this - untested - just to give you some inspiration... Create a new field on the User template for their hashed password from your old system. Write a script to populate this field where there's an email match between the old system and the new one. If the new system doesn't have users in it yet, then great, you'll be creating user records for everyone from the old system. Make sure you create a long, random, password for the initial processwire password on any new users you create and leave existing user passwords untouched. Store the hash from your system in the new field on the matching user and save any changes. You need a before hook on the session::login method. Use the name param (in $event->argument(0)) to match on emails if that's how you did it in the old system, if you have exactly one match, and this user has a non-empty value for your old password hash, use your existing pwd checking algorithm to authenticate them from the pass ($event->arguments(1)) parameter. If that works, the plaintext password they submitted to you is the correct password. Now set the PW password on that account using the plaintext password you just verified is correct AND delete the old password hash value. Now the correct password has been stored in the User's PW pass field, just exit the hook and PW should process the login as normal, or call the forceLogin method to log them in and do your own redirect. Basically, as people log in, they will auto-convert their accounts over to PWs way of doing things. Once they convert, the login process just reverts to using PWs method. Potential gotcha: more than one account in the PW system with the same email (if there are already accounts in there.) After a reasonable period has elapsed, you could then deal with seemingly dormant accounts by emailing non-converted users and asking them to login (or otherwise handle them as appropriate.) Hope that helps.
  7. There are several modules that might help. Most by Macrura here in the forums.
  8. Maybe open an issue in the issue tracker if not yet done?
  9. If anyone is using wire-cli, and you find you're getting a lot of PHP warnings about not being able to set session parameters after headers have been sent, this may help. You may need to add a custom session function to site/config.php to prevent ProcessWire attempting to setup session handling when it's bootstrapped by wire-cli from the command line. YMMV, but this seems to be working for me. NOTES: Adjust the path if your admin interface is not at /processwire/. If you need sessions on the public (non-admin) paths of your site, remove the "ADJUST THIS PATH..." line and change the final line to "return true;". /** * Custom Session Control * * - Keeps non-admin pages free of cookies/sessions * - Unless there is already a session cookie * - Prevents session start on CLI invocation (wire-cli etc.) * - Allows admin pages to use sessions */ $config->sessionAllow = function($session) { if ($session->hasCookie()) return true; $req_uri = $_SERVER['REQUEST_URI'] ?? false; if (false === $req_uri) return false; // CLI invocation? if (0 === strpos($req_uri, '/processwire/')) return true; // ADJUST THIS PATH IF NEEDED return false; };
  10. Some VPN software has something like a "Local Network Sharing" setting. If your VPN has such an option, might be worth seeing if that fixes this for you.
  11. I don't have any idea - but could you let us know what error(s) you are getting, as that might help?
  12. @ttttim I just switch a site over from PostmarkApp to Brevo with your module and quick change to the sender id. Seems to work fine at first glance. Thank you for your module!
  13. Hi @bernhard thanks for the recent improvements to the livereload feature! Please ignore my suggestion above - it was just a "I wonder if..." kind of thing. What you've done with adding things to the error and ajax pages are great.
  14. Ah, I like PostmarkApp for transactional stuff, but their monthly limit is a quite low on the free tier (though I am thankful for it.) Brevo's limits are somewhat better. I will be trying out this module soon, as I'm just calling brevo's API directly at the moment and want to use a module for this.
  15. @Chris-PW Welcome to the plugin-author's club :) Would you be able to create a github account and create a repository for this? It's the next step to getting this published in the PW modules DB.
  16. Very timely, thank you for this, and congratulations on your first public module release!
  17. Works great, thank you both!
  18. @BitPoet It's been a while, but would you consider publishing this module to github + the PW modules directory? That would make it more discoverable for PW folks. Thanks for the code though!
  19. @bernhard I only found this post here in the forum - and not realising this had changed - went looking for it in the RockFrontend config settings. Pehaps the title of this thread could be changed to reflect that this is no longer available in RockFrontend?
  20. Is this still an option? If so, I can't seem to find this in the module config for RockFrontend. Also, the screenshots seem to be from RockPageBuilder?
  21. Ok, everything seems to work out of the box if you first install PWs PageFrontEdit module (which I didn't do as they were all fresh installs!) I guess this is what fulfills Alfred's JQuery dependency without the need to edit the _init.php file. @bernhard Could the code catch this by default? So if the need for alred is detected server side, but PageFrontEdit is not installed, add a message about installing it? Could also be added to the alfred script so it pops up an alert about installing PageFrontEdit?
  22. Hi @imandreas Yes, I changed this in _init.php and Alfred now runs as expected. My point is that I think this should be included automatically within the RockFrontend site profile, or be in the RockFrontend documentation for Alfred. Or perhaps the code for Alfred could pop up a JS alert box indicating the need to load JQuery - which would save having to look at the console. $rf->scripts() // load uikit ->add('/site/templates/uikit/dist/js/uikit.min.js', 'defer') // load custom javascript of this project ->add('/site/templates/scripts/main.js', 'defer') // load jQuery from /wire to allow ALFRED testing ->add('/wire/modules/Jquery/JqueryCore/JqueryCore.js', 'defer') // <<< Added // minify on production ->minify($config->debug ? false : true); This is just to get things running for testing - would need to conditionally include it only if alfred is needed.
  23. @bernhardI've been trying to get Alfred working on my local ddev stack - but have failed so far. I've added the needed {alfred($page, 'fieldname')} code to the latte template to trigger alfred inclusion on the page render - and the script is being included, and is download from the server. I view site, while I'm logged in as superuser (ddevadmin). Just like iamandreas, I get the following... I've checked the role rockfrontend-alfred is present, and the ddevadmin is a superuser. I've now tried this with a PW dev & PW master codebase, in three separate ddev installs - one with the default docroot - and have had the same result on each one. Setup was super easy with ddev and then rockshell, and they all had your RockFrontend site profile installed. So, it looks like jQuery isn't being included in the scripts when needed maybe?? Anyway, will dig some more.
  24. Hey @bernhard - I will be trying out RockPageBuilder on a project soon - but for now, I think a config setting for the livereload feature, that allows a superuser to configure which templates to livereload pages for, would be a neat feature for anyone who doesn't get RockPageBuilder. Personally, I would only use this feature for local development though.
  25. Just started using RockFrontend on a local site and I'm relly enjoying livereload when updating .latte templates. In fact, as I work with my admin pages in a window on the left, and the site in a window on the right of my screen, I wanted to get livereload when saving pages in the admin - but only for the basic-page template. So here's a little hack. Adding this to site/templates/admin.php, before the line require($config->paths->core . "admin.php"); works great, and I now get livereload on page save or file changes. Not sure how well this will work with Alfred though as I'm not using that yet. $pages->addHookAfter('saved', function($event) { $p = $event->arguments(0); if (in_array($p->template->name, ['basic-page'])) { // Update array as needed $touchfile = __DIR__ . "/.lastupdate"; touch($touchfile); } });
×
×
  • Create New...