Jump to content

Recently Updated Topics

Showing topics posted in for the last 7 days.

This stream auto-updates

  1. Past hour
  2. Hello dear forum, I'm building the backend of a kind of magazine. The magazine has different contributors. Each contributor has it's own tree in the page tree, like this: home/user-articles/contributor-a/ and should be able to post articles as children to contributor-a. On the contributor-a page (template called "article-list") there needs to be a list of dates. These dates (a repeater in "article list") are used as select options in the article the user is going to post. So far so good. However, if the user tries to create a new article, and there haven't been any dates posted to the future parent yet, I get an error : "TypeError ProcessWire\InputfieldPage::getPageLabel(): Argument #1 ($page) must be of type ProcessWire\Page, string given, called in /var/www/html/wire/modules/Inputfield/InputfieldPage/InputfieldPage.module on line 700" wich only occurs when there's no date(s) posted to the parent yet. Now I'm thinking about only allowing adding new children to that "article-list" template when at least one date is available, and am stumped as to how to solve this. I basically need to disable the "new" button in the tree view - or basically anwhere it might show up - and post a message explaining what's up. Pretty sure I need to hook into ready.php (or admin.php) but other than that I'm struggling.. If anyone has any pointers (or just some skeleton code) that would be great, thanks in advance!
  3. Today
  4. Small update following a small issue I had: when saving a template the module now makes sure "sortfield_reverse" is unset, in case the user was previously sorting using a reversed sort direction
  5. Hi all, if you log in since Friday and click the Notifications (bell) icon in the forums then you should see this message which allows the forums to send alerts for messages and topics you are subscribed to via browser notifications. There is also PWA (Progressive Web App) feature that I've enabled so you may also see "Install to Home Screen" as an option for both Android and iOS. If the PWA works as intended, you will have an app icon on your device and, I think, notification badges should appear there too, so if you're like me and have had email notifications switched on for followed content you can edit your notification settings and change this to Notification List I think. Apologies for the vagueness but the forum docs are a little unclear in places. It is all optional and if you don't want to use either feature you don't have to of course.
      • 7
      • Like
  6. @BillH Thank you so much! Setting up a custom upload folder solved it! I wonder why some servers return an error when using move_uploaded_file, although its seamingly works just fine?
  7. Yesterday
  8. Wow, I missed that. That is the beauty of the friendly ProcessWire Community. You always learn something new. Thank you!
  9. Hi community, is somebody having an answer or news on this? Kind regards, ottogal
  10. Last week
  11. Based on driving myself completely insane with noHooks for the last 2 years, and based on what Ryan specifically said here: ... I completely agree with Ryan. noHooks option should be absolutely avoided. Seriously, if you use it in advanced cases like I have been doing, you will hit every WTF issue known to man. It is not made for developer use, even though it gives off that vibe. I think that is a mistake. I will write more about this in depth soon, but at least in my situation, my goal was to ultimately update a page and all of its descendant repeaters (repeaters within repeaters) only after the page is its descendant repeaters have been saved completely first without hook interference. Using noHooks basically fucks up everything up (saying it's been frustrating dealing with it is an understatement) and there are unintended consequences everywhere! The correct way to do what I described is to do something like this, which took forever to figure out (every line has a specific reasoning behind it): // // /site/classes/OrderPage.php // class OrderPage extends Page { public function getAggregateRootPage() { return $this; } public function finalize() { // your code to finalize the page, such as populating an order_total field, etc. } } // // /site/classes/OrderLineItemsRepeaterPage.php // class OrderLineItemsRepeaterPage extends RepeaterPage { public function getAggregateRootPage() { return $this->getForPage(); } } // // /site/init.php or /site/ready.php (doesn't matter) // wire()->set('finishedPages', new PageArray()); // hook 1: use Pages::saved only to build list of pages to finalize wire()->set('finishedPagesHook', wire()->addHookAfter('Pages::saved', function(HookEvent $event) { $page = $event->arguments('page'); if(!method_exists($page, 'getAggregateRootPage')) return; wire('finishedPages')->add($page->getAggregateRootPage()); // duplicated pages won't get stored }, [ 'priority' => 1000 ]); // hook 2: use ProcessWire::finished to finalize the pages 🤌 wire()->addHookBefore('ProcessWire::finished', function(HookEvent $event) { wire()->removeHook(wire('finishedPagesHook')); foreach(wire('finishedPages') as $finishedPage) { $finishedPage->finalize(); } }, [ 'priority' => 1001 ]); When I demo my system one day which is way more complicated than the example code above, it will become clear. // TLDR: don't use noHooks when saving a page. DON'T! Instead, create a log of what pages need to be finalized, and act on those pages in ProcessWire::finished hook, which is when you can be absolutely sure the coast is clear. I wish I knew about that hook earlier. If you follow those simple rules, you don't have to think about CLI vs non-cli, ajax vs. non-ajax, whether the current page process implements WirePageEditor, uncache, getFresh, saved vs. saveReady, before vs. after hook, hook priority, editing a repeater on a page vs. editing the repeater "directly", where the hook should go (it should be in init.php/ready.php or in the init()/ready() method of a module), etc. Note: there's a whole other aspect to this in terms of locking the a page to prevent multiple saves (like if a page was being saved by an automated script and the same page was being saved by an editor in the GUI).
  12. @ErikMH - I don't think I have ever seen a discounted renewal option. How do you renew a module for those reduced prices?
  13. In case you are using this module and want to sync customers/purchases to Mailchimp – we just released an add-on for this module:
  14. Hi, everyone! We recently built a small add-on module for our StripePaymentLinks setup and thought it might be useful to share here. We’ve been working with StripePaymentLinks quite a lot lately, and one thing the clients always wanted was a simple way to get purchases synced into Mailchimp without relying on external paid add-ons. So we built a small ProcessWire module to handle exactly that. The idea is simple: every time a customer makes a purchase via StripePaymentLinks, their details (name, email) plus the purchased products (as tags) get synced directly into Mailchimp. That means you can instantly segment, automate, and follow up with buyers without any manual exports. We built this because we didn’t want to rely on a separate paid Stripe → Mailchimp connector. With this add-on, it’s all handled natively inside ProcessWire — lightweight, minimal, and no extra subscription fees. What it does right now: Hooks into the creation of purchase repeater items (repeater_spl_purchases) Pulls customer name + email from the User created by StripePaymentLinks Extracts product names either from the expanded Stripe session line_items or as fallback from the purchase_lines field Pushes everything to Mailchimp, creating the subscriber if you allow it in the config Assigns the product titles as Mailchimp tags Config is super simple: just drop in your Mailchimp API key, Audience ID, and decide if you want to auto-create subscribers or only update existing ones. We’re keeping this intentionally minimal — one module, no extra steps, no fuss. Install, configure, and you’re done. We’ve been running it in production for some clients and it’s working reliably. If you’re already using StripePaymentLinks, this could save you the cost of external integrations while keeping everything in one place. Get it here: ProcessWire: https://processwire.com/modules/stripe-pl-mailchimp-sync/ Github: https://github.com/frameless-at/StripePlMailchimpSync Happy to hear your feedback or ideas for tweaks. Cheers, Mike from frameless Media
      • 4
      • Like
      • Thanks
  15. Hi all. Loving the searchEngine Module!!! Just a quick question, I have a global search in the main navigation as well as on the search results page. How do I set the action on the renderedForm to point to the search Page results? got it! $searchEngine->renderForm(['form_action' => '/search/']); Many thanks in advance 🙂
  16. Is there a way to remove sites from the ProcessWire Sites directory, that are no longer powered by ProcessWire or does this happen automatic? https://processwire.com/sites/ Sadly, I have a few websites, that are no longer powered by ProcessWire anymore. 🙁
  17. Hello all, @BFD Calendar - this did actually the trick. If no user is logged in the textblocks render once as expected. Thanks for the hint! I also figured out, that this behaviour depends on frontend editing, which is enabled for this particular field in my case. Once this is disabled, it also works fine even when logged on to processwire's backend. For my scenario I m fine, however, I think it is a small glitch and could be enhanced... any opinions if I should file a bug report for this and how and where? Many thanks!
  18. FYI, you can view all the template access overrides for a field on the Overrides tab of Edit Field.
  19. Ok, thanks. When I get a few minutes I'll take it up again and see what happens.
  20. Thank you - this is really useful to know. If I’m understanding it correctly I think we’re ok in this instance as we’re only pushing content to Bunny via API rather than the CDN hitting the site itself. It’s definitely early days though and I think there will be lots of edge cases to look out for. We’ve thrown this together for a product MVP that will have some ad traffic sent to it, so there should be plenty of data to look at. The main motivation at the moment is to minimise the data storage burden vs local storage on the VPS where the rest of the site runs rather than performance optimisation. But caching/compression etc will be interesting next steps.
  21. Thanks! I'll see what our host (OVH) says and keep you posted.
  22. Hello! I want to find out if this plugin is able to take over all mail sending within ProcessWire automatically by simply replacing the default WireMail Class. If so, where can I configure "SMTP via OAuth" like it is described here: https://github.com/PHPMailer/PHPMailer/wiki/Microsoft-Azure-and-XOAUTH2-setup-guide Is that even possible, or do I have to manually go through all my websites forms and send the mail programmatically? Luckily, I do have all the Azure Application-IDs and secret codes right here, but where do I fill them in?
  23. I don't get a notice from LRP either. For the backend, I tried both a dash and now an underscore and neither work. I did manage to login via the backend after a few attempts.
  24. Updated to this last version but I still keep getting an error: Parse Error: syntax error, unexpected token "{" Line 1984 of /site/modules/Pages2Pdf/mpdf/mpdf.php Also, images are stretched when rendering the pdf: https://www.birthfactdeathcalendar.net/events/dates/november/1-november/?pages2pdf=2867 This is the code for images: <td width='150' valign='bottom'> <div style='max-width:150'> <img src=\"{$webimage}\" align='right' style='width:100%; height:100%'> </div></td> Processwire 3.0.246 PHP 8.4
  25. Dear Nicolas, I regret my late reply. Yes, I am interested. Nantes certainly sounds French. We can also continue our conversation in French if you prefer. Bien le bonjour! François Alesch You can reach me on WhatsApp at +43 650 2537243
  1. Load more activity
×
×
  • Create New...