Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by elabx

  1. Hi @nbcommunication! First of all, thanks for this awesome module! I'm a user of PageimageSrcset too! I was wondering, how do you handle when webp's are larger in size than the original jpegs?? This happens to me far more often than I'd like to and sometimes it's more than double the size of the jpg image ๐Ÿ˜ž I went ahead and set useUrlOnSize option to true, though the source type attribute then it's kinda wrong although it seems to work just fine! Anyway, just wondering if you had come across a similar issue. Maybe it's worth being able to set the webp options in the render method?
  2. Can you try: $block->getLanguageValue($user->language, 'textarea');
  3. Oh yes of course, sorry! Didn't mean to sound condescending was just trying to elaborate for @cryostar! I got confused into who I was answering.
  4. I remember Snipcart does have recurring payments but not on their latest API ๐Ÿ˜ž My first idea would be to look into the actual payment gateway provider, in my case my first option is Stripe which I've used their Checkout API and it's pretty straighforward, very well documented and saves a lot of development time by basically letting stripe do a lot of the heavy lifting including the actual subscription management. But I haven't actually done a subscription site! So this is all wishful thinking haha. https://stripe.com/docs/billing/subscriptions/checkout#create-session EDIT: Just realized this is a very old topic ๐Ÿ™ƒ
  5. That is the output of a PageArray, try making a find() that finds more than one page, and you''ll see what I mean! It would render something like this: 1107|1200|1201|1021 So, since you only find ONE page, it only outputs that page, but it is still an instance of a PageArray object getting echoed, and the echo outputs like the example. Take a look a this line of the PageArray class: https://github.com/processwire/processwire/blob/master/wire/core/PageArray.php#L701 And I'll venture to say this has to do with this magic method: https://www.php.net/manual/en/language.oop5.magic.php#object.tostring
  6. An alternative would also be findOne:
  7. Just quickly found this, maybe it helps you figure something out? https://docs.vuukle.com/how-to-display-article-comment-count-on-the-home-page-of-your-site/
  8. I'd say you are, basically it's your decision to just use a template that is just used by one page, that render a specific file and that's it. You can even prohibit the template from being used more than once under the template's Family settings.
  9. This works?? $data = $event->arguments(0);
  10. I think I just have never used it before haha, but from what I know of it it does look like it could do the work.
  11. I don't think there is a "best practice" written down somewhere for this sort of scenario. I agree it can be confusing to figure out the "right solution" when there would seem to be so manyw ays to achieve the same. If all the values from the identifier are okay with being a text type value, I would go with a Table field with two columns, a Page Reference that fills its options with the "catalogue" of "possible IDs" and a text field that acts as the field for the actual value, this way you can have whatever fields you want on each organization, and you can do stuff like: $pages_with_purls_identified_orgs = $pages->find('template=organization, ids_table.id_type.name=purls'); This also guarantees you can also add new identifiers in the future very easily and consistently. You could do almost exactly the same with repeaters. Why table and not repeater? I just prefer the interface of the table field, I think it's less clunky visually when few fields are involved and has a more snappy feel. If each identifier would need more data added, I'd go for a repeater, but since it seems it's just an ID name and the actual value, table field seems enough. Repeaters would also have the "overhead" of loading an extra page on memory per repeater, since each repeater item is a processwire page. Although another scneario, what if the value of each identifier is a different type, then the table field would not work as nicely. Say you need DOI to be alphanumeric and ORCids to be integers, maybe for this case a repeater could work, with the same catalogue of identifiers, except that you create two additional fields (one text type, one integer type) and show them conditionally depending on the value of the page reference field where the type of identifier is selected. Please take this idea with a grain of salt, just something I came up with right now. It might be a hassle to manage the relationship of "identifier - type of value" on the actual code, or it might be worth the trouble, or there might be a better solution out there ๐Ÿ™‚
  12. @benbyf I'm still using it without issues! And even use it with @bernhard's RockMigrations . I think there is an issue with the composer install related to composer 2, but you should be able to install it like a normal module. EDIT: @benbyf dude I completely tripped and was thinking I was in the old Migrations module thread lol Nonetheless, I have also used this project a lot and noticed it breaks with most recent php version, I think 8+
  13. Could you do a search through your codebase to find if somewhere you might be assigning that property to the page (a typo)?? At east it happens to me sometimes that I swap a variable's words like that lol Came for the title, stayed for the issue ๐Ÿคฃ Like, wow what's FieldtypePhantom
  14. elabx

    Community Gamers

    That was one of the first games I had on PC!! I was like 10 or something, I couldn't believe there was such a funny game haha, it really opened my eyes to what could exist as a videogame. Now I'm thirsty for some table melting quality grog.
  15. Is the repeater set in the projects template? Maybe a screenshot of your template/repeater field config could help!
  16. They are, you need to configure that inside the repeater field, on the Details tab where you add the actual fields for the repeater, click on the field's label/name and it will popup a configuration screen that will be set the configuration in the context of the repeater field. (in case you use the fields in other places, for example)
  17. Wouldn't this be the concept of a template, that has the 15+ fields you need. So on your page tree you could end up with something looking like this: - Cards (a page with a template called cards-display-page, without any other field aside from title) -- Card 1 ( a page with a template called card, with the 10+,15+ fields you need) -- Card 2 (another page of type card, ready to be filled) Since you seem to be new to ProcessWire (at least from what I perceive on your posts!), maybe you are not familiar with the idea that a Page can also be just a sort of "data bucket", it doesn't really have to render the page itself. I see that you have solved this issue of your cards with a Repeater, though just wanted to let you know you could potentially do this, and actually behind the curtains, Repeater items are actually regular Page objects! I have used Perch in the past to build a couple sites and I do remember it was very practical to define fields inside the templates.
  18. Hi @spercy16! Are you super sure tall_card is the name of your repeater field? It seems to be a non existent object.
  19. That's a very good question haha, it just happened to me just today when moving a live site to local development for some upgrades and found the recommendation around the forum, I didn't dig much deeper into the exact issue with the fingerprint and the change of environment. Though I can tell you I noticed that had to be related to the fingerprint because the session log shows a message about it. You should still be able to something under /site/assets/log/session.txt. I can also tell you that those lines are not originally on the file because the site/config.php file is sort of an "override" to the more complete wire/config.php. So in that link I pasted you can see the whole configuration, and on the site/config.php file you specify exact details of your installation. I don't think the order is really relevant on this files as the values defined are used further in the actual execution of the ProcessWire scripts.
  20. Can you try on site/config.php: $config->sessionFingerprint = false; $config->sessionChallenge = false;
  21. I remember this topic being one of those moments of "enlightenment" when learning processwire haha.
  22. Move the page in the tree to be sibling of Pages, like you would with a regular page.
  23. Related: https://github.com/processwire/processwire-issues/issues/550
  24. Try: $page->parent->get('menutext|title');
  • Create New...