joe_g
Members-
Posts
395 -
Joined
-
Last visited
Everything posted by joe_g
-
this still works in 2024 :) (answering my own question from 2013 haha)
-
Thanks, i sort of imagined that elasticsearch would be the solution. My case is a bit different I've got both misspelled words but also a mix of languages. A word can be very similar in another language but not directly misspelled. Interesting suggestions, nevertheless, thanks!
-
Hi there, I've got a question I suspect there might not be an easy answer for: Is there a way to do fuzzy search to allow for spelling mistakes? For example, showing results with 1 or 2 characters wrong or missing, or similar? thanks, j
-
Hi there, I've run into a problem I'm not sure how to solve. I have a site with many languages (>10). If I create a page (="Author") through the admin ('new'), per default all languages are checked and marked as 'active'. Great. However, If I create the same page through a page field ('press enter to create a new page'). Per default, no other language than default is checked. The client has to remember to re-open that newly created author and check >10 checkboxes for this page to be available in all languages. How can I make sure all languages are checked per default in both cases above. So that no matter how the author is created all languages are always checked? many thanks, J
-
Thank you both @jploch using the custom field is clever. Then the mp4 automatically have an image to be used as poster. If it's only a series of mp4's and images this could work really well! @gmclelland I didn't know about this one! Could potentially be interesting if there is a lot of extra fields per image. If I understand correctly it create a repeater item for each image, but since it's a regular repeater it's not possible to insert a non-image in betwee, or similar. Still interesting within it's use-case.
-
Hi there, In almost every project I find myself wanting to use the images field for being able to drag many images at once to one field. It's super convenient. However then I loose the ability to be able to mix other filetypes in the same collection. Usually, after a while clients come back and want to have a video in there somewhere or perhaps even an embed. Then I have to rethink how that works and by using repeater matrix the interface becomes clunkier (new 'image' -> upload -> new 'video' -> upload, etc). I'm dreaming now but it would be amazing with drag and drop support for repeater matrix, repeater items are automatically created from the file-type (jpg and mp4 mostly). Not sure where I'm going with this, mostly I wanted if I missed something or if this idea could work. I know there are some media library extensions around but I could never befriend them 100%. best J
-
aahhhaaa! Had no idea about that button. Yes indeed it's there, works fine. Thanks!
-
Hi there, I'm using ProcessWire 3.0.229 and repeater matrix 0.1.1. I've got myself a repeater matrix in a repeater matrix – and inside there - an image field with an extra field 'caption'. This extra field doesn't show up in the repeater matrix: The field is enabled: and looks like this: any ideas how to get it to work? many thanks, J
-
Weird performance issue with $image->width(400)->url;
joe_g replied to joe_g's topic in General Support
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. -
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.
-
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
-
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 ?
-
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.
-
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!
-
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.
-
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
-
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.
-
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.
-
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
-
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?
-
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 ?