Jump to content

joe_g

Members
  • Posts

    358
  • Joined

  • Last visited

Everything posted by joe_g

  1. Thanks, That actually works, but I think it might be for the wrong reason. There can't actually be any slowdowns because of permissions, I suppose? It has to be something else. Not sure what exactly yet, but I'll see if i can find out.
  2. Hey there, I've got a site with a weird performance issue. Requesting ~20 pages and displaying them with $image->width(400)->url can take up to 2-3 seconds. The resized images are already generated. If I replace that line with $image->url the request is almost instantaneous, as it should be. So it seems like the width() function is struggling for whatever reason. Could it be something with permissions on the files under /assets/files that is causing this? An example of the file with ls -lah looks like this: -rw-r--r-- 1 www-data www-data 510K May 8 10:32 20_10_xxx_web.800x0.png The original (is fast) looks like this -rwxrwx--- 1 joe www-data 1.3M Mar 16 16:36 20_10_xxx_web.png* I should probably restrict the permission a bit, but first I'm looking to understand this slow down.
  3. Hello, I discovered that the import/export function doesn't include custom image fields (I've got a rich text field for captions). I suppose there might be no easy way around this limitation, but if there is, let me know! J
  4. 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 🙂
  5. 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.
  6. Hi all, I had this happening on a clients site today. The CMS doesn't show and there is some js errors. There hasn't been any code changes, or changes in general from what I know. But I suppose something must have changed. Not sure where to start figuring this one out, any ideas are very much appreciated!
  7. 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.
  8. 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
  9. Thank you, i take that as if it can't be done with a selector (on the database side of things). The filtering needs to happen after getting all the results.
  10. Thanks both! I'll try and have a look if I made some mistake. I know I had a similar code that set active to everything globally, and that worked without problems. So perhaps it's when I create new pages, somehow.
  11. 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: 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'. How can i specify a redirect to the default language instead getting a 404 for a page with a missing language? many thanks J
  12. 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?
  13. 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 🙂
  14. 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!
  15. Hi there, I've added a custom image field (Select Options dropdown) but I can't get it to show in the backend (see below) This is inside a repeater matrix, if that makes a differences many thanks! j
  16. Yes, thank you. I think this is what I'll do (my own check) - it feels safer.
  17. Hello, I've been putting global functions in _init.php for quite a while. However when doing a wire404(); _init.php is called again and i get a functions redeclared error. but _init.php seems to be made for this purpose? Is this a bug or did I misunderstand?
  18. Yes thank you, but the page needs to be created the regular way (backend editing). I found the setting, interesting! Now I just have to figure out to make this default checked for certain templates...
  19. 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
  20. 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!
  21. 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
  22. Tried it now and it works beautifully! Thank you for this update!!
×
×
  • Create New...