rastographics
Members-
Posts
76 -
Joined
-
Last visited
Everything posted by rastographics
-
Using DDEV for local ProcessWire development (tips & tricks)
rastographics replied to bernhard's topic in Dev Talk
Oh cool how did I miss that? It ranges from 35 to 50 ms on both backend and frontend pages. (Just started project so not a lot of complexity going on yet) -
How to add own tab in Admin on edit page via API?
rastographics replied to dotnetic's topic in API & Templates
@bernhard did you put this code inside a custom page class? -
Using DDEV for local ProcessWire development (tips & tricks)
rastographics replied to bernhard's topic in Dev Talk
-
Using DDEV for local ProcessWire development (tips & tricks)
rastographics replied to bernhard's topic in Dev Talk
Thanks for all of your input! The video @bernhard shared confirmed what I suspected I was missing...you can't just open VS code from within the WSL2 environment....you need to make sure your project files all live INSIDE the file system on WSL2. So that means do NOT leave them in /mnt/c/your/windows/file/path, but move them to /home/username/your/linux/file/path. NOW it's the best of both worlds! :) Blazing Fast, with no mutagen and no delays after changing code. The downside is your project files don't live on windows file system anymore. But I found you can still access easily from File Explorer by using \\wsl.localhost\Ubuntu or use the Linux shortcut on the navigation pane: Do not open your project from the "Windows" location (open from within WSL). But many times I need to access this location through windows to copy/paste files of assets and other things I download or create on the windows side. -
Using DDEV for local ProcessWire development (tips & tricks)
rastographics replied to bernhard's topic in Dev Talk
Bummer, I opened the project through Remote Explorer in vs code. I went to "WSL Targets" and the little "Open new folder" icon, and opened my project remotely in the WSL environment. Unfortunately, it did not give the same 200ms response time as what I would call "native". (Using mutagen, or laragon on local file system, etc). It was *better* than non-mutagen ddev response from windows environment. About 1 second, compared to 2 seconds on windows. But still slow enough to aggravate me. :) I really had expected a better result when working in the WSL2 filesystem directly. -
Using DDEV for local ProcessWire development (tips & tricks)
rastographics replied to bernhard's topic in Dev Talk
That's exactly what I was looking to do. That's a good tutorial for it. I'll report back with my findings hopefully soon. -
Using DDEV for local ProcessWire development (tips & tricks)
rastographics replied to bernhard's topic in Dev Talk
You are correct. I didn't realize it until I went back in to work on my code, that there is a delay about 1-2 seconds to recognize code changes. (I'm using VS Code). So it is not without a downside. However, since browsing the site is now practically instant, it more than makes up for it for me, as opposed to 1-2 seconds per page load (in my case) which really adds up especially navigating around the backend. I wish I could find a way to realize instant page loads (~200ms) without enabling mutagen, to get the best of both worlds. But I can't find an answer yet. (I have Xdebug disabled btw) To be clear, I believe the underlying issue is with the WSL2 filesystem and/or DDEV and docker. This is NOT a processwire issue. The next thing I might try is to open my project completely from the WSL2 environment and see if that can give me the same great performance instead of mutagen. -
Using DDEV for local ProcessWire development (tips & tricks)
rastographics replied to bernhard's topic in Dev Talk
This may be helpful for others who are using DDEV inside of WSL2 on Windows... Although Mutagen fixed the page loading problem, it introduced a (lesser) problem of creating a delay between when code is changed and when the change is picked up by the file system. See my post below for the correct solution to both problems. Do yourself a favor and Enable Mutagen! I did not enable Mutagen because the DDEV docs say it doesn't make a difference when using WSL2. IT MADE A HUGE DIFFERENCE for me. Every page request was about 1 to 2 seconds before. After mutagen, it's about 200ms. -
Thank you! the results are night and day better this way. This extension works great for doing site-specific searches through google: https://chrome.google.com/webstore/detail/search-the-current-site/jliolpcnkmolaaecncdfeofombdekjcp?hl=en For the sake of those newer to PW community, I hope there's a way in the near future the built-in search on the site can get results more similar to google's
-
Something definitely up. I noticed when searching blog posts for "custom page types", that it returns over 250 results. Going through the first couple pages of results, I don't see any that talk about custom page types. Try doing a search just for "hello"...it returns a ton of blog posts that don't include the word "hello" anywhere in their content. https://processwire.com/search/?q=hello&t=Blog
-
Hi, I'm struggling to find answers in the forum recently. It seems like no matter WHAT my search term is, this screenshot is always the first results (sorted by Relevancy). I'm trying to find documentation on the Custom Page Classes most recently. But any search I do that has the word page anywhere in it, brings up these exact results for me, even when I use a bunch of different terms in addition to "page". Am I just going crazy or is anyone else noticing these posts always at the top of your searches?
-
Server management services like Runcloud, Ploi, ServerPilot, etc.
rastographics replied to elabx's topic in Dev Talk
@d'HinnisdaëlI know there are older threads talking about nginx configuration for processwire, but just curious if you can share any of your configuration files that are working good for you? I don't have a clue about nginx but really want to start using ploi -
would love to see your script for pipelines. I tried setting this up a couple years ago and gave up.
- 66 replies
-
- developing
- working with pw
-
(and 1 more)
Tagged with:
-
Hi, I did a search for "files" on the processwire.com to find the api for working with files...and it looks like the site breaks? This url: https://processwire.com/search/?q=files Looks like this This only happens when I'm logged into processwire.com. If I browse in Private tab, then it works as expected
-
@horst the admin thumbnails all showed up when I first added the images (I would do about 100 at a time until all of them were done). I saved the page. (which is why everything works on the front end side). I'll make another page with the same thumbnails to see if I can replicate this. Is there a place to look for server logs or turn logs on, that would show me potential errors when I redo this process?
-
I have a template that has an `images` field. On one of the pages using this template, I have about 500 images (about 2MB each). The images display perfectly on the page when viewing it on the front end. However, if I attempt to go to the edit page in the admin dashboard (`/admin/page/edit/?id=<ID>`) then php will timeout after 30 seconds. To be clear, the front-end view of my template does NOT timeout (after the initial page load and the image sizes are all generated, this page is very fast to view). No issues on front-end whatsoever. The admin edit page times out. ONLY for this particular page. I have other pages using the same template, with 150-200 images, and no problems with accessing the edit page. Any suggestions? Is the images field not made to scale past a couple hundred images? Thank you in advance.
-
@psyThat's exactly what I was looking for...a way to make sure the entities are eager loaded. Just didn't know it was a thing and what it was called :) Well, turns out that when I tried to use "join"...it didn't work because my processwire wasn't on a recent enough version. So when I upgraded to latest master version...it works! And furthermore...it works WITHOUT using the join feature as well. Just needed to upgrade...must have been a bug somewhere that got fixed in the past year. Thank you everyone!
-
@Zekathanks, yes I did try that. It does not work. I also tried the number value that corresponds with that option. I have other queries in my api that have selectors that just use the task_status field, but not as a sub-selector on a page reference field. So just 'task_status=finished'. Those work fine. Just getting the 'disc_order' template and using 'task.task_status=finished' is what does not work. What is baffling is my query works in the page finder. It also works when I put it in a template page. My api.php page has many other queries using other selectors, and none of them behave different than expected. (None of them are trying to select based on a property of a Page field, however)
-
This is my selector: pages()->find("template=disc_order, task.task_status=finished, order_status=pending, sort=created, check_access=0, limit=1); The "task" field is a page reference. The "task_status" field is a Select field. This selector works as expected when I use it on a normal template page. However, when I use this same exact selector in a different file (my_api.php) the selector no longer returns any results, UNLESS I REMOVE: task.task_status=finished If I remove "task.task_status=finished" and add "task.id=34234" instead, it will return results. Or if I run this same selector in my template, it works. Scratching my head here, this is really weird...
-
File Upload inside Custom Module
rastographics replied to SoccerGuy3's topic in Module/Plugin Development
@SoccerGuy3 Would you be able to post the relevant code that got this working for you? Been struggling for a couple days getting this to work. After I call for the WireUpload->execute(), the files array that it returns is always empty. -
No errors, I can upload any file type. The accept parameter is a html web thing, not just a Windows thing, from all indications here:. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept For now I just added the accept attribute manually to the field. I'm surprised this is not done by default? What other functionally does extensions property provide if it doesn't limit what file types can be uploaded?
-
Awesome solution just what I was looking for! For a little more flexibility, instead of hardcoding to allow robots if debug is false, I added a checkbox field on the robots template so I can turn SEO blocking on or off from the backend.
-
Error when moving to production...
rastographics replied to rastographics's topic in General Support
thanks everyone, @adrian it was indeed permissions issue. happened because I had copied the assets/files from old site to new using root user, but apache configured to run as a different user per site. To help anyone who finds this, I ran: cmod -R 775 on the assets/files folder, as root. -
Site works great on staging, moved to production (different folder/user on same server), site front-end works, but trying to create a new page on the backend gives this error: DirectoryIterator::__construct(../releases/1548970736/site/assets/files/1140/): failed to open dir: No such file or directory (in /wire/core/Pageimages.php line 134) The database is an exact copy. Only thing I didn't copy over was the backups/cache/logs directories from assets. (I did copy the "files" directory). The folder it is referencing "site/assets/files/1143" ...that directory never existed on staging or production. Don't know why it's trying to call that directory from the getAllVariations() method in wire/core/Pageimages.php??? It gives this error no matter where in the tree i try to create a new page. EDIT: Just realized that the "1143" in the error message "site/assets/files/1143" is the id of the new page I'm trying to create.