Jump to content

joe_g

Members
  • Posts

    356
  • Joined

  • Last visited

Posts posted by joe_g

  1. Thanks Ryan,

    So there is nothing wrong with any module or js, or anything with processwire. The sysadmin started changing the settings in nginx. The message doesn't stem from cookiebot, it comes from an nginx error, from him adding an exception to cookiebot.

    False alarm, but many thanks for the help. It was a sysadmin that didn't update us others 🙂

     

  2. Thank you both for your quick responses!

    Things started working again. I think what happened is the sysadmin was messing with CSP settings in nginx without telling anyone, causing a slight panic.

    In the mean time i got this screenshot from Brave that makes no sense at all. It's complaining about GTM and Cookiebot, that I load on the front end (but not in the backend, I suppose?!?)

    to be continued - thanks again! It's nice to know it's possible to get help in these cases. I'll update as soon as I know the full story.

    image.thumb.png.700a0b049d09d2569c196c2d43d0fa28.png

  3. Not sure if I made myself clear. Typical example: Most news should be sorted by date but sometimes you want something on top, or slightly affect the order. It's difficult to say "sort by date, except this particular thing that should be on position 2". It's kind of a luxury problem, I know, but I have it sometimes.

    What you're saying is to have a manual sorting function, somehow? So that the client decides when to automatically sort things and then reorder - until sorted again as a explicit choice. That could work, possibly, but what I would really like is default is sorted except for manual changes.

  4. Hi all,

    Something I've been wondering about and it's a situation that have come up a couple of times in the past:

    I wish there was an interface for manual (drag and drop) reordering of a dynamically selected subset of some selector. My current, and latest, example of this is the following: One client has a vast archive of events and wants to show a selection (based on some criteria) of them somewhere, but still be able to reorder them. Ideally any new items that is added to this selection appears according to some sort (like by date, but adheres to manual order if moved).

    So, for example, show events within range X and Y, automatically sorted by Z - UNLESS manually sorted, then retain that manual order as long as it's visible.

    Not trivial, I know. Mostly I'm posting this out of curiosity if someone have needed something similar.

    I think my options are 1. add a checkbox 2. a page selector of some kind (manually select the pages) 3. give up on manual ordering

     

  5. Or perhaps, my whole approach is wrong and i should rely on active for translated pages instead. Maybe that's better, but then I don't know this:

    1. If I would want to make a language switcher for a specific page, how do I loop through all active translations? I can't find a selector for 'active'.
    2. How can i specify a redirect to the default language instead getting a 404 for a page with a missing language?

    many thanks

    J

  6. Hi there,

    I've got a site with 12 languages. When I create a page in the backend all languages are active by default, great.
    However, when I create a page via the api NO languages are active, except the default language. Why is that? And, how can I make sure everything is active all the time?

    I tried this piece of code to make all language active in a recently imported page...

    foreach($languages as $lang) {
      if($lang->isDefault()) continue;
                
      $p->set("status$lang", 1);
      $p->save();
    }

    ...but it messes up the data. I've got a repeater matrix where the content gets repeated 12 times with the code above. I'm not sure why it interferes with the repeater matrix

    Is there a safe, non-destructive way to make sure all languages are always active?

  7. I've got an image field with an added custom field "caption", this caption is multilingual. I'm trying to update this field from the API, but I'm not managing.

    Even though I set a language to non-default the data is saved in the default field.

    For example if set the language to Spanish

    $user->language = $languages->get('es');

    Then I set the caption ($block is a repetear matrix)

    $block->of(false);
    $block->images->first->caption = 'Spanish Caption';
    $block->save();

    the default caption contains 'Spanish Caption' and the spanish version is empty.

    Any ideas are welcome 🙂

  8. Hello!

    How do i include pages with non active languages in a search?

    Say I want to find ->find('template=x'), regardless if it happens to be 'active' or not in the current language?

    If I do include=all I also get hidden, unpublished, from the trash, (i think) but I just want the inactive versions. Is there a selector for this?

    Thanks!

    image.thumb.png.0f3e18dde7af82a1c9c9d8c53041f390.png

     

     

  9. Hi all,

    I have a memory I've seen a module for this but I can't find it now: That when you save a page the name is globally unique, instead of just unique within it's siblings.

    So that if there is another "page-with-name" somewhere my new page becomes "page-with-name-1" even though it doesn't have the same parent.

    many thanks,

    J

  10. Thanks for getting back. I don't mean this as criticism, this is only to check if it would make sens to try padloper with this particlar project I have in front of me. I'm not in a rush, if not this project there will be another one later.

    If I think about it, this is what would make me try it out (if not now then maybe some time)

    — written docs with documentation of api
    — written MVP that is easy to copy paste that contains no extra markup or code - so just the absolute minimum of HTML, like most of Ryans examples. This is especially important with the cart, since the cart is the selling point of Padloper (for me, at least, otherwise I might as well use formbuilder and it's checkout).

    I personally much prefer text documentation, since I can copy paste examples and scan the page quicker. For example FieldtypeTable has mostly video documentation and to try and find out how the selectors should look like to search a FieldtypeTable is an exercise in scrubbing back and forth in that one particular video.

    I have to think about whether I can get involved in the process, but thanks for the invitation!

    • Like 1
  11. Hi all,

    Is there someone here who tried to start a padloper project from scratch lately? I tried about a year ago and the docs were somewhat missing. I'm curious to hear about the experience to start from zero now. I can the see the docs are a bit more in place?

    My problem, at the time, was the examples was written with a lot of HTMX. HTMX is amazing but it's hard to read, and there was no plain non-HTMX example from what I remember. From what I remember padloper itself was returning a lot of markup, where I'd rather create all the markup myself. Not only for clarity, but to understand how it works from scratch.

    I've got another opportunity to start a webshop project and I'd love to avoid doing a shopify integration, but I'm not too keen on spending days going through existing markup like last time. So therefore I'd be curious to hear other peoples experiences.

    J

  12. Thanks, I think I'm familiar with this. He's describing the standard processwire fields. It's not a hierarchy, rather a 3-way join. In my case I'd like to specify a "role" for each relationship "person" and "article".

    It's solvable with a Repeater, for example (a repeater with "person" and "role", for example). The problem with repeaters is that the search queries gets a bit awkward. I've run into problems with searching in repeaters in the past (having to use getForPage() and  check_access=0) so I'm a bit hesitant to use them to store anything that needs to be searched for later on. Unless repeaters have changed under the hood I suppose I will run into the same thing today if I were to look up all "articles associated with a person", for example. So I was hoping there was a better way.

    But perhaps repeaters have improved in the mean time?

    I did test the FieldtypTable just now, and it works as expected, so that's an okay solution actually

     

     

×
×
  • Create New...