Jump to content

kongondo

PW-Moderators
  • Posts

    7,473
  • Joined

  • Last visited

  • Days Won

    144

Everything posted by kongondo

  1. I don't remember the last time I laughed so hard ?.
  2. Thanks for confirming. I noticed the same in this w3schools example and also htmx sse. If you run the w3schools example, even just the JavaScript without the server code, you will notice JS running in a continuous loop, much as you describe above. This has left me more confused about SSE. I thought JS would just initiate first contact with the server then sit and wait for a stream. On a change on the server, JS would respond. So far, I don't see much difference between SSE and Ajax polling. I'll need to read up more about it. Any one got any thoughts on this? @netcarver? Thanks.
  3. Hi @3fingers, Thanks for the example. Could you confirm that this is indeed SSE-driven as opposed to polling? For instance, if you console.log like this: getData(event) { return new Promise((resolve, reject) => { console.log(event.data) if (event.data) { let result = JSON.parse(event.data) // If the incoming page id is different than the current one, hide the container. // if (this.id != result.current.id) { // this.fragmentShow = false // } // This allows the <Transition> vue component to complete its animation before resolving the result. setTimeout(() => { resolve(result) }, 300) } }).then((result) => { this.resolveData(result) }) }, do you see a constant stream (in the console log) or do only see events pushed after you save your ProcessWire page? Thanks.
  4. Hello @maetmar. Welcome to the forums. I have no response to you. I just wanted to point out that I don't think this module is still officially supported. I am not saying it doesn't work; it does. It just won't receive attention from the author, most likely. If you still cannot find an answer to your issue, you might want to consider alternative menu creation modules, such as this -> Menu Builder (I am the author ?).
  5. Where do you store the article during the editing phase? I am assuming an article can be in this phase for more than a day.
  6. https://www.remotion.dev/ https://github.com/remotion-dev/remotion Never heard of this till today. Anyone used it before?
  7. My point was that saveReady will be called everytime you save but added will be called only when you create the page. However, I totally missed the id=0 bit. So, yes, my point itself is somewhat obsolete in this case ?.
  8. Maybe then.. <?php $wire->addHookAfter("Pages::added(template=xyz,id=0)", function($event) { $page = $event->arguments(0); $page->status = 1; // auto-publish }); ? ?
  9. PayPal indempotency and currency issues have been fixed.
  10. Padloper 2 has received a number of updates, pushing it closer to a production release. Stripe Finished the Stripe payment gateway. It is based on the latest Stripe Payment Intents + Stripe Elements. The Stripe Elements widget is fully configurable (UI). I will be updating the docs about this. You can test this now in the demo site. Make sure to read 'about' first here. If upgrading, there are a number of simple steps (actually just one simple step). Just create a page titled Stripe in the admin under the payment gateways parent page. Currently, it is not possible to create a payment gateway using the GUI. Shipping Rate Selection If more than 1 shipping rates are matched, the checkout form will now present the customer with a form to select their preferred rate (e.g. express - €5, standard - €2, etc.). [I have just noticed a bug if using the inbuilt form with this; I'll fix asap]. You can test this by adding this product to the basket and selecting Kenya as the shipping country. Variants The demo site and the starter site have been updated to show how to handle products with variants - adding to basket, checkout, etc. You can test by adding this product or this Padloper [fake] product to the basket. Pay using Stripe and you'll even get to download Padloper! OK, file's fake, obviously. Reports View and functionality is now ready. Powered by htmx. Hoping to create a demo video of this and other backend views soon. Downloads This was not ready in the last release. it is now. Test with 'Padloper' product linked to above. If upgrading, you will need to install the related Fieldtype + add it to the download template. I'll write up about this separately. Bug Fixes Fixed a number of bugs. Docs I've updated the docs in some places. New Requirement I have added a new requirement for PHP BC Math Extension. Currently, Padloper will not work without this. Otherwise we have never-ending pennies/cents rounding errors. Whole libraries have been created just on this one issue; just Google it. BC Math solves it for us. Pending Manual Order Creation: this has been a difficult but getting close to finishing it up. Documentation: Especially the most pertinent. Some minor bug fixes. Some PayPal indempotency + rounding issues! If anyone knows how to pass amounts as pennies/cents to PayPal instead of whole currencies, please let me know. It used to work with the old API. I haven't been able to find how to do this in the latest API and checkout SDK. Production Release My plan is to release a stable version in March 2022. Beta testing has finished. Thank you all who've participated. Edit: making the demo site pretty and perform better on smaller screens is still on my todo. It's not urgent though. Thanks.
  11. Haven't tested this in a modal. One way to do it. <?php namespace ProcessWire; $this->addHookAfter("ProcessPageEdit::buildForm", null, "hookModifyEditFormGUI"); function hookModifyEditFormGUI(HookEvent $event) { if ($event->method == 'buildForm') { $page = $event->process->getPage(); // here you can use $page to skip changes based on a condition // ------------ // get ProcessPageEdit Form $form = $event->return; // not needed just for debugging // $children = $form->children; // get save + keep unpublished button $saveAndKeepUnpublished = $form->children->get("id=submit_save_unpublished"); // if we found it, remove save + keep unpublished if ($saveAndKeepUnpublished) { $form->remove($saveAndKeepUnpublished); } // ------- // get publish button $publish = $form->children->get("id=submit_publish"); // if we found it, change its value if ($publish) { $publish->value = "For Pete's Sake"; } // <<<<<<<<<<<<<<<< // @debug bd($event, __METHOD__ . ': $event at line #' . __LINE__); bd($event->method, __METHOD__ . ': $event->method at line #' . __LINE__); bd($page, __METHOD__ . ': $page at line #' . __LINE__); bd($form, __METHOD__ . ': $form buildForm - at line #' . __LINE__); // bdb($children, __METHOD__ . ': $children buildForm - at line #' . __LINE__); bdb($saveAndKeepUnpublished, __METHOD__ . ': $saveAndKeepUnpublished buildForm - at line #' . __LINE__); bdb($publish, __METHOD__ . ': $publish buildForm - at line #' . __LINE__); // >>>>>>>>>>>>>>>>>> } }
  12. Other options to consider Custom inputfield One of the runtimemarkup modules I'd use htmx with any of the above. Vanilla JavaScript would also work but htmx would give you maximum control over the markup with very minimal effort. With this combo, you could go as fancy as you like (locking edits for some roles, showing preview of colour combos, etc.).
  13. No there isn't. I just fixed it in MM 012 as it was a very minor fix. Could you please check around line #42 of this file site\modules\MediaManager\configs\fields.json. If you have a "fileSchema": 7, entry please delete that whole line.
  14. Use ProcessWire's Pages Export/Import module. In the demo below, we are exporting everything. In your case, instead of selecting Media Manager as the parent, select Media Manager: Document (since you are only interested in the PDFs). It might take a while depending on the number of media pages you have. Once the zip downloads, import it using this same module (use the import from zip option). Job done. Note that sometimes you might have to repeat an import in case some files were missed. I've seen this especially with images. If you are running out of memory, you can switch to importing batches instead (use the find pages to import using selector option in that case). Edit: Demo was supposed to show here; but forum doesn't like gifs (old problem). I have thrown the file in this archive instead. export_media_manager.zip Hmm. I am not sure. I'll have a think. Hope this helps.
  15. Thanks for the purchase :-). Sorry the notes weren't clear. It must be the adjacent (immediate previous) column. So, yes, 'its previous column'. Please see the docs here, especially the introduction and the section on column relationships. This is because both the 2nd and the 3rd columns are related to the first. The duplicate values getting shown in 3 are due to the JavaScript which determines the select to populate based on the trigger. In your case, your target selects 2 and 3 have an identical identifier (built off the field name 'background_colour'), hence both get populated. No, you are not missing anything. What's happening is expected behaviour. The cascade is strictly one-to-one (trigger-dependent selects relationship). Incidentally, I am soon reworking Dynamic Selects to use htmx. That will open new possibilities. I'll have a think around your issue, as a feature request. Hope this helps.
  16. Aha :-). What's the difference between this site and the other non-problematic one? If they are different with respect to ProcessWire versions and/or PHP versions, then best to file a bug report, thanks. If they are not different in this regard, then we'll need to keep digging; maybe a third party module interference, etc.
  17. He can see the comments if logged in, so might not be a CSS issue but an access one ?. I see. Given that everyone can see other parts of the page even if not logged in (e.g. blog title, etc), this seems to suggest an access/view issue with the comments field itself. Have you checked the 'Access' tab in the comments field?
  18. It's right there in your settings ? (as per your screenshot). Under Comment moderation, your setting says All comments must be approved by someone with page-edit access. Hence the 'Pending' comments you are seeing. You need to approve them in order for them to be visible on your site for your 'guests' (commenters). Edit: If you specify an email under Admin notification email, you will get notified every time someone (or something -> spam) posts a comment on your blogs. You will be able to approve/disapprove the comment directly within your email (if you wish).
  19. I haven't looked at your code but the comments field is where I'd look first (with respect to comments visibility). As for a logged in user seeing all comments, you are logging in as a superuser, hence can see everything (including the comments field).
  20. Interesting. So, with this approach we only need to register the template via a setting (on the template edit screen) and that same template can be used to output either HTML or JSON, right?
  21. It might also be a 403 (permissions changed in your file or the folder it lives in). As stated above, have a look at the console for any errors (if a module refresh did not resolve your issue; including clearing your browser cache or viewing in incognito).
  22. Yes. There are these alternatives though: ☝️this has never worked for me though. Will at best return an empty array and at worst throw a SQL error. Works fine for me, except for URL. I get ratio, width, etc. https://processwire.com/api/ref/pages/find-raw/
  23. Hehe. In fact I had started adding the below but thought to save it for another day. But I'll add it here and then stop this OT business! I was saving above for a Blog post when Padloper stable is released...but oh well. And now, I shut up ?.
×
×
  • Create New...