Jim Bailie
Members-
Posts
77 -
Joined
Profile Information
-
Gender
Male
-
Location
Chicagoland
Recent Profile Visitors
Jim Bailie's Achievements
Full Member (4/6)
35
Reputation
-
Emptying / resetting all fields for a recently cloned page?
Jim Bailie replied to theoretic's topic in General Support
Ha! I could tell my users to do that, but unfortunately they would not respond positively. The reason I'm interested in this thread is that I will soon need to: Clone a page (same template) Retain some field values Remove remaining values Populate 2 field values based on certain conditions Position the clone in the page tree based on said conditions I think just somehow iterating through the KNOWN field names/values and doing the work is the way to go, but it's always good to hear about any efficiencies that others my be aware of. -
Emptying / resetting all fields for a recently cloned page?
Jim Bailie replied to theoretic's topic in General Support
I'm interested in any input on this from more experienced PW devs, but I do wonder if this post helps at all: -
New blog post: Introducing the Custom Fields Module
Jim Bailie replied to ryan's topic in News & Announcements
@ryan Understood. I suppose I would rephrase the question with a scenario. Let's say I install the module, will it or could it auto-generate definitions of existing fields? I hope I'm not missing something obvious. And I will read the post in detail, but we have to head out for the evening 🙂 -
New blog post: Introducing the Custom Fields Module
Jim Bailie replied to ryan's topic in News & Announcements
Wow. This is really something. Thanks @ryan! I didn't read the the entire post, but are these or will these Custom Field "maps" be exportable from an existing install? -
Alright, I just looked at what I did to address this and it looks like I just renamed the two files to ProcessLogin.js.bk and ProcessLogin.min.js.bk This is, of course, not an elegant solution but it did solve the problem very quickly. I do recall now that I need to go into the server and see how the system time is setup relative to any php/pw settings that may be causing this problem systemically.
-
I was dealing with this very recently. Below is a link to another thread regarding this. I also made an additional change to the JS file mentioned below, but I don't have access to this code today. Can post tomorrow. This seems like it started happening after US daylight savings last hit...
-
Hide the Admin User row on the /processwire/access/users list
Jim Bailie replied to Jim Bailie's topic in General Support
@Ivan Gretsky As luck would have it, I do have ListerPro, and now the problem is solved. Thanks! -
For 20+ years I've always maintained a Windows box and a Linux box connected via a KVM switch and with a dual monitor setup. I also have a somewhat older Intel IMac I keep for various tasks. I haven't given it much thought as I regularly switch between Linux and Win10 throughout the day. As far as distros go, I'm using Ubuntu 20.04 KDE and will probably upgrade (clean install) after summer sometime. My $0.02...
-
How much time is needed to learn ProcessWire?
Jim Bailie replied to dan222's topic in Getting Started
Some first steps: Have you gotten a working PW instance installed and running in a dev environment? Once that's done, install Ryan's "Skyscrapers" site profile and study that. Maybe add some features or use it to setup an instance for a personal project. And of course, there's PW community which is very helpful. -
How to protect files from being downloaded directly via url
Jim Bailie replied to hintraeger's topic in API & Templates
FWIW -- I have a template called "downloads". When someone goes to https://example.com/downloads/specialfilename.php, the file name is treated as a url segment. From the url segment, I will essentially: Search for the file Make sure it's there Then deliver it via the mime process // Get page ($p) where the file lives // Still here, so lets see if we can get the actual file $file = $p->filesManager->getFile($fileNameSanitized); if(!$file) return 'File not found(3)'; header("Content-Type: application/pdf"); header("Content-Disposition: inline; filename=$fileName"); header("Content-Transfer-Encoding: binary"); header("Accept-Ranges: bytes"); @readfile($file->filename); return true; -
Yikes! - URL Segment Bypasses Template Access Control
Jim Bailie replied to Jim Bailie's topic in General Support
@JoseFrasher Update: Not really. It is what it is. If you set your 404 page to a page with a protected template, that page will render for Guest and not redirect to the page that it should redirect to **If you have a url segment in the URL**. My solution was to just create a dedicated 404 page with its own template and handle things there. Probably a better approach than what I had originally. -
Yikes! - URL Segment Bypasses Template Access Control
Jim Bailie replied to Jim Bailie's topic in General Support
Thanks. Ok, this is a closed application and there's a 404 redirect in config.php set to go to a page/template with active access control. Therefore if I add a url segment to a protected page/template, it will get 404 redirected to a page/template that should redirect to a login page if there is no active session, but that protected page is rendered instead. I hope this makes sense. It's not the end of the world as I will need to do some checking in the code, but it is unexpected behavior. -
I have a page: "example.com/privatepage" that has a template requiring users with a specific role. But if I type in "example.com/privatepage/some-url-segment" then the page renders!! I'm not seeing an obvious solution in the template settings...
-
My _init.php file is running multiple times (Regions?)
Jim Bailie replied to Jim Bailie's topic in General Support
Thanks all. @ryan I will do this immediately, thanks!