Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Hallo @Peter Knight Yes, it was referring to the /processwire/ manager login. I'm a bit surprised, because I thought it was already fixed.
  3. Today
  4. That's really good, thanks for the suggestions! I'm going to keep that as a potential way. I like it, thinking outside the box. 🙂 My somewhat liazier solution is simply to add a field to the user template: Legacy, Legacy converted, and New. If A Legacy user attempts a login it simply sends them to the password reset page. And when they do they become Legacy converted. Your way is far slicker so I'll present the client with both options.
  5. 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.
  6. Issue submitted: https://github.com/processwire/processwire-issues/issues/1911
  7. Hello @BrendonKoz, On the code above I didn't copy the namespace and use statements but this is not the issue, instead of using ProcesswireTemplate I can directly use strings but this is not working either. EDIT: I've edited my code to remove this ambiguity, using strings instead of class ProcesswireTemplate.
  8. I have an old custom site I built myself where the passwords are hashed using BCrypt. I'm assuming the answer is no due to the one-way nautre of hashing but is there any way to take my bcrypt-hashed passwords and import them into PW? Where as my passwords stored the BCrypt strength, hash and salt together, PW seems to store the hashed password in two parts. I think it's further complicated by the $config->userAuthSalt value (this looks more like a pepper to me). It can't be done, can it? In which case, will just have to copy the emails, etc across into PW and send them each an email asking they set a new password or display a message on the website if a legcay email is used to attempt a login.
  9. Yesterday
  10. Checking all 3 of these will probably do what you want, but I actually never use the second two because I make use of the "Enable Guest Dumps" button from the panel selector. Enable that, do what you need to do as a guest in a private window and then reload the PW admin where you are logged in as a superuser and you'll get the dumps recorded by the guest. Another thing is to make sure you have the "Tracy Exceptions" panel enabled so that if a guest user interaction results in an exception, the bluescreen with full stack trace will be made available for easy viewing. I rely on this for all my sites with Tracy's production mode. Hope that helps.
  11. I had thought I had Tracy enabled for all users (excluding guests) awhile back and disabled it. Now I can't seem to re-enable it now that I need to diagnose some things. I am not restricting non-superusers (or superusers for that matter), the Tracy Debugger is enabled, and I even tried to match the IP address using PCRE pattern of /.*/ with no luck.
  12. It works for me too in a similar context - i.e. when calling it to output: i.e in {$page->foo()} - but not when called in a variable declaration - ie. {var $foo = $page->foo()} That's when I seem to need {var $foo = $page->ProcessWire\foo()}. Odd. EDIT - Correction: The issue occurs not with page classes but just with functions defined in init.php (which is in the ProcessWire namespace.
  13. Agreed, because I read alot of forums and realized that it could allude to a myriad of reasons, only reason I was able to sort this was looking at the source and getting help from @Christophe
  14. I try to get info for an old url-path found in PagePathHistory. $p->getPathInfo() does not return anything but the basic empty reply. What am I doing wrong? $p = $modules->get('PagePathHistory'); $p->getPathInfo("/en/about/child-page-example/") array (10) 'id' => 0 'path' => '/en/about/child-page-example' 'language_id' => 0 'templates_id' => 0 'parent_id' => 0 'created' => '' 'status' => 0 'name' => '' 'matchType' => '' 'urlSegmentStr' => '' And that page is found in the database page_path_history table: INSERT INTO `page_path_history` (`path`, `pages_id`, `created`, `language_id`) VALUES ('/en/about/child-page-example', 1002, '2024-04-13 16:31:53', 0); The module PagePathHistory is version 0.0.8 and PW version 3.0.237.
  15. I'm responding with no experience using custom page classes, so if my reply is just silly, I apologize. 😁 Perhaps I'm missing something, but I think my question here is also the question that ProcessWire is throwing an error about. Where do your ProcesswireTemplate::INDIVIDUAL_CAR_CHOICES and ProcesswireTemplate::INDIVIDUAL_CAR_CHOICE variables' values come from? In fact, where is the ProcessWireTemplate class located? There's a Template class in wire/core, but I'm not seeing a Processwire* class anywhere. If those classes/values don't exist, that could cause the errors to be thrown. If you're moving the code to another class, maybe it's not actually being called/used and ProcessWire is falling back to using the standard Page class?
  16. If you have a look at the RockFrontend Site Profile you'll see that it should work without namespaces: https://github.com/baumrock/site-rockfrontend/blob/3c6dcc3d6a73432f4a98f5d47bec9858fa1fbd23/templates/sections/footer.latte#L17 https://github.com/baumrock/site-rockfrontend/blob/3c6dcc3d6a73432f4a98f5d47bec9858fa1fbd23/classes/HomePage.php#L27 I have no idea why the syntax you mention would work. I've never seen adding a namespace on the method call of an object 😮
  17. I do love Latte, but one little thing is puzzling me at the moment: namespaces. I am using custom page classes for all my 'business logic' - e.g a method getEmailHash() in the custom page class called in the Latte script with $page->getEmailHash(). The class has the namespace ProcessWire. It seems that I always need to specify the namespace in the method - i.e. $page->ProcessWire\getEmailHash(). Is there a way of avoiding this?
  18. There are several modules that might help. Most by Macrura here in the forums.
  19. You can use https://processwire.com/modules/fieldtype-runtime-markup/ for that.
  20. Hi all! Is there a way to add comments and documentation directly in the admin area, e.g. above the page editor? Field descriptions and notes are not sufficient in some cases, when one wants to document more complex things or explain something more detailed. I know that one can add a custom admin page, but I am searching for a way to document things directly in the pages where the editor users are working. Thanks in advance for any tips!
  21. Depending on your requirements, the Stripe payment processor for FormBuilder might be worth investigating. You can set Paypal to be a payment option in Stripe so that users can pay using PayPal but you can keep all your transactions on the same plaform. Out of the box FormBuilder might not do everything you need (if you need a basket etc) but it is possible to hook into the module to update line items / prices etc. We recently built a basket system for a site that we'd wired directly into Stripe but then shifted over to hook into Formbuilder instead because it already did a lot of the heavy lifting in using the Stripe API.
  22. I've only just spotted this but, in my ddev environment, if I modified a page the modified date was always recorded as one hour earlier. So appears on the settings tab immediately after doing a modification (at 14:55). The production environment was OK. I have $config->timezone = 'Europe/London'; throughout in config.php. It seems that you also need to set the timezone (in my case 'timezone: Europe/London') in the ddev config.yaml
  23. Maybe open an issue in the issue tracker if not yet done?
  24. Hi, I post here before to report an issue, just in case I'm missing something (using PW 3.0.229). To create instances of a custom page class, I'm adding a static method on it: class IndividualCarChoicePage extends Page { public static function create(UserPage $user, ChampionshipPage $championship): void { $carChoiceParent = wire()->pages->get("parent_id=$championship->id, template=individual-car-choices"); $carChoicePage = new IndividualCarChoicePage(); $carChoicePage->of(false); $carChoicePage->template = "individual-car-choice"; $carChoicePage->parent = $carChoiceParent; $carChoicePage->title = $user->displayUsername; DevUtils::prettyPrintObject($carChoicePage); exit(); } } But the template is not defined: ProcessWire\IndividualCarChoicePage Object ( [id] => 0 [name] => [parent] => /assetto-corsa-competizione/championnats-acc/championship/choix-de-voiture/ [template] => [title] => MyName [data] => Array ( [title] => MyName ) ) And then the admin is corrupted: The blue page is the parent page of the newly created, you see the arrow on left indicating it has a child, but this child is not displayed. And there's not way of solving this issue, I can not delete the parent page "Choix de voiture", the trash refuses to delete it! Now, if I move this code to another class, that is not extending Page and not located in /site/classes/ directory: IT WORKS! The new page is created with its template. Why?
  25. I would put it over here, on its on page: https://processwire.com/docs/start/install/ I put it on my todo list but I cannot promise anything as I hardly have free time these days.
  26. Thx @Christophe that's some good questions 🙂 I've updated the profile to hopefully answer all of them: https://github.com/baumrock/site-rockfrontend/commit/be55adae28ffe6a7aac83944284820f17afdaabf You don't need to use tailwind. If you don't want to use it just remove the _tailwind.css file. If you find anything happening that should not be let me know and I'll fix it.
  27. Someone could create a topic in the forum, maybe in the tutorials section, eg "how to fix request appears to be forged". And we could then simply add a link to that topic to the error message.
  28. It would be nice to have a documentation page that lists all possible causes and fixes for this general error message. The forum is littered with requests for help regarding this issue, but I think in development mode there could be a link to a ProcessWire documentation page that actually helps to resolve it. There isn't an infinite number of things that can go wrong, and I think it would be possible to list them all, or at least almost all.
  1. Load more activity
×
×
  • Create New...