-
Posts
1,303 -
Joined
-
Last visited
-
Days Won
16
Everything posted by elabx
-
I think it depends a bit on how you display the data. I'm doing a 2+ million pages and I'm struggling a lot with queries. But displaying pages of the data is not that bad. Searching on one field, such as a title field is somehow fast (a 5- 10 seconds). Trying to do something like the following can be really slow: $pages->find("template=blog_post, page_reference_field1.title|title|page_reference_field2.title%='something I want to match'"); I'm using a lightsails erver 2vcpu, 4gb ram. Don't really know if using a dedicated db server would help.
-
does ProDrafts have scheduler support built in?
elabx replied to Confluent Design's topic in General Support
This could probably be solved by using this module: https://modules.processwire.com/modules/schedule-pages/ -
[SOLVED?] $pages->uncacheAll() doesn't seem to be working.
elabx replied to elabx's topic in General Support
The site will mostly be cached with ProCache so I'm hoping CPU usage will only be heavily used when making the first import run. I'm planning to do about 3-6 million pages. Not entirely sure of the spike costs cause I'm not relly handling hosting payments. UPADTE: I don't know what the heck happened but now the script is performing ok with no memory spikes :S -
[SOLVED?] $pages->uncacheAll() doesn't seem to be working.
elabx replied to elabx's topic in General Support
Just tested both and I still see the memory go up and up :S Weird thing is the original setup just works okay on local even tested on another server previously and worked fine, it was all since I set it up in the AWS Ligthsail VPS that it failed, that's why my initial thought was some mystery php.ini setting. Even stripped down the script to the bare minimum to discard something else I was not seeing. Anyway, will keep on looking. -
Hi! I am iterating through a very big CSV that check for existing pages on a PW installation . This all works fine on local development and if the records already exists in PW, I basically skip to the next iteration. This was initially causing memory issues until i added a $pages->uncacheAll() method, which cleared the result of the $page->get() from memory. Note, this is running through a CLI script. foreach($csv as $i => $record){ echo round(memory_get_usage(true) / 1048576.2) . PHP_EOL; $selector = "template=property"; $existing = $pages->get($selector); if ($existing->id) { $pages->uncacheAll(); continue; } } Unfortunately on the AWS Lightsail VPS I'm using, it doesn't seem to matter and memory usage just keeps growing. Am I missing some setting on PHP configuration maybe? I already checked the memory for the CSV iteration only (using PHP League CSV library) and it keeps memory in a fixed value (pretty much how it happens locally while iterating and using uncacheAll() to clear memory). Adding gc_collect_cycles() doesn't seem to do anything either.
-
Permissions on AWS wont let processwire create files/folders
elabx replied to Laikmosh's topic in General Support
Just in case someone stumbled into this, this command worked for me: sudo chown -R bitnami:daemon /opt/bitnami/apache2/htdocs sudo chmod -R g+w /opt/bitnami/apache2/htdocs -
What type of field are you using to display the video? Were are you planning to server the videos from? Maybe give us a few screenshot of your template/fields configuration.
-
Yes, save the page! $testpage->of(false); $testpage->save();
-
This has happened to me on some big PW version updates, but I honestly don't have much more info as to what could trigger this ?
-
CKEditor - Justify Preinstalled on Textarea Fields
elabx replied to prestoav's topic in Wishlist & Roadmap
You can use AdminOnSteroids to enable this on the text fields you need them, it's super handy, no need to install justify plugin or configure each field!- 11 replies
-
- 1
-
module TrelloWire - Turn your pages into Trello cards
elabx replied to MoritzLost's topic in Modules/Plugins
And some background on why you built this would be really interesting too! Looks great! -
@LuisM wow great breakdown! thanks for all this info!
-
I've used this library with success to import products or update them regularly like on a cron job: https://github.com/donutdan4114/shopify Takes care of rate throttling too which is nice!
-
https://maquiladorademuebles.com/ Here I did a very rough integration of the Shopify Js SDK with ProcessWire, so that I could add more specific things to each product, when I talked to the client it was more important to have the potential to have more flexibility when uploading the product's content so we went this way of using Shopify inside PW. My first mistake was rolling my own Js integration when I could have just used the Buy Button SDK (instead I used the Js SDK with Vue). Second mistake. One thing I didn't anticipate that turned into a mess: discounts. I had to setup fields in Pw where I had to set the discounts (after setting them up on shopify), so a lot of double data entry on some cases. I've done also things the other way around, setting up ProcessWire as an application that launches within Shopify, so that I could use PW pages as extra content management for Shopify product pages. (very complex product descriptions) unfortunately the project I did this for never launched. Agree with @Pixrael the Shopify API is really easy to work with.
-
It's not built out of the box, but you could easily build a Process module, and render the forms you need using the formbuilder API you'd normally use on the frontend.
-
Been using Sizzy for a while and things I really like are: Screenshots, I work remote so it's a time saver to show clients a preview You can actually inspect every one of the screens and debug! Things I don't like: A lot of RAM needed.
-
By any chance, does your POST endpoint end in "/"? If not, try that. It has happened to me on the frontend that POST doesn't work without the ending slash.
-
I feel I'm going to go crazy in containment in my no balcony flat. On the other hand, I feel profoundly thankful for my working conditions because I have a lot of friends loosing their jobs or freelance income since last week and s**t hasn't even hit the whole fan here in México. Stay safe everyone! Best of luck!
-
Smarter solution!
-
If using flexbox you could use the order property to change the order of the columns, I normally add a class to a parent div that wraps both columns. foreach($page->repeater as $i => $item){ //Going to offset the count starting from 1 instead of 0 so I can use modulo operator $i = $i + 1; $class = ""; // If the count is even, such as 2,4,6, etc. if($i%2 == 0){ $class = "invert-order"; } echo "<div class='row {$class}'>"; //output the columns here echo "..."; echo "</div>"; } You should end up with something like this: https://codepen.io/elabx/pen/RwPMaym
-
Don't know if overkill but you could also a hook on getSelectable()
-
I like UIKit because it just has all the js thingies bloat that 90% of clients/agencies always want on their sites: slider, slideshow, cover images with <img>, vieport height utilities, etc. What I don't like in the most recent version is that I can't apparently leave out the Js of components I am not using. I've also become very keen on using it with the Less PHP compiler to quickly make edits to the core components (and actually cherry pick the css I want to include, unlike the js) I've recently used bootstrap on some projects and REALLY like their utilities for padding margins and them being also responsive which is where they have a big upper hand to UIkit I feel.
-
Because I just didn't know you could to that ? Just went through the docs and seems pretty straightforward to do it. Thanks!
-
Hi! I have a site that uses a lot of disk space but not so much resources in terms of ram and CPU, I've been wondering if it's possible to change the path where the files are saved? So for example, I'd be able to use Digital Ocean's block storage service which enables more space in another volume.