Jump to content

elabx

Members
  • Posts

    1,303
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by elabx

  1. Running 3.0.165 I have this weird thing happening where somehow pages with children don't show the Trash action, I can only delete them from the edit screen. I have access control enabled and the user with the role that shows this behaviour have the page-delete permission enabled and everything that seems to be needed to edit/publish/trash since the user has worked without issues up until noticing this detail. Single pages on the main root also display the Trash action. Parent Page without the trash action: First children with the Trash action: Forgot to mention this is all fine for superuser.
  2. Hi @bernhard ! Pretty much the same use as @Ivan Gretsky. I also use the backup functionality when making batch migrations of data along multiple installations or just when I want to do it quickly from cli.
  3. 110% agree. Everybody was so mad when they announced something that is NOT dropping your backups on a custom destination haha.
  4. There is also a place to put a selector string right bellow that custom find option, try this selector (hope im understanding your issue correctly): parent.template=mag-issuse, template=article, sort=-created
  5. Setting up the template selection to mag-issue and setting the field to single display under Details tab, and the template setting under Selectable Pages under Input tab. What exactly is not working well? Watch out for hidden pages too!
  6. Just had a situation where one of Runcloud utils came in handy, I was able to block a rain of requests coming looking for WordPress stuff with their per-applicatinon Firewall/ModSecurity settings. As someone who isn't really knowledgeable on htaccess or firewall settings, it came in super handy to save face with the client.
  7. This is really nice to know! I actually have a ServerPilot account from when they had their free tier, quite a few years ago and it's still running my first pet project with ProcessWire, getting 100k-200k sessions a month on a 5USD Vultr VPS.
  8. Sounds like a plan! I'd start asking if you have enough understanding on how "routing" in processwire works as well as template/fields concept and how they relate to pages. With that said, I'll try to quickly illustrate an example: This is definitely a way you can add content using the API. Let's assume you have a template named "new-product", and a page "New Product" with said template under Home page. You end up with a page tree like this: Home -- New product -- Products --- Product 1 --- Product 2 This page doesn't need to have fields, it's just a place (a route) to handle code with /site/templates/new-product.php template file, which is automagically assigned to every page with the template "new-product". Here is some sample code that would live on that template. if($input->post->submit){ //Do stuff like sanitizing and validation, very important // Some basic page creation saving would look like this $newPage = new Page(); $page->template = "product"; $page->parent = $pages->get('template=products'); $page->title = $sanitizedTitle // This comes from the imaginary code above $page->save(); } else{ //Do the form rendering however you want. } This way user arrive to /new-product/, submits a form, and you handle the page creation right there. As you can see, products get a parent page, which is the page called Products, where I'm also assuming it has a template named "products", it is another tempalte without any required fields in the current context, it just handles the organization of the products. You would end with each product under: /products/product-1 /products/product-2 Last but not least, FormBuilder pro module handles the form-to-page process basically out of the box.
  9. Hi everyone! This services have popped around in conversations around the forum and wanted to give it its own topic to share some experiences with these services. I have personally used Runcloud and I am happy with it, specially with their support which is most of the time really fast. But feature wise Ploi seems to be really far ahead features wise and I really wish for a lot of their stuff like load balancer, the backup system, db servers, etc.
  10. I just had this exact same issue! @gmclelland Did you ended up reporting it on github? Thanks for your post, saved me tons of time!
  11. I think you shouldn't have any issues running WooCommerce in a subdirectory as far as PW is concerned, although I cannot speak from a personal experience.
  12. Try curly braces around the $item->images->first()->url. Actually I don't think this won't really solve the encoding issue haha. ?
  13. @netcarver 's answer pretty much covers this. My advice would be to watch out for anything involving counting, such as pagination and complex selectors using the Selector API.
  14. You can do this through a CLI script boostraping ProcessWire. It should be possible, I've imported millions of rows from a CSV using very little memory, although taking quite a bit of time. I'd recommend also using database transactions for saving batches of new pages.
  15. It seems you are calling save() a few times on the page you are expecting in the hook? First when creating the page, and later when adding the repeater to the page, and then one last time (which might be unnecessary?)
  16. I'm in this exact same position, UIkit solves A LOT of the "interactivity" requirements coming from clients/agencies.
  17. I didn't risk to try! Couldn't find the time to explore the possibility for that specific project.
  18. Thanks!! I know @Wanze is now a bit disconnected of the ProcessWire world that's why I haven't tagged him but seems like my last hope ?
  19. Seems UIKit is returning a Promise? I think this should work?? Got it from here: util.ajax('/data/newsletter/', { responseType: 'json', method: 'POST', data: JSON.stringify({ mail:mail, sms:sms, msg:msg, cmt:cmt, }), }) .then(function(xhr) { console.log(xhr); if(xhr.status !== 200) { UIkit.modal.alert('error xyz'); } }, function(error){ //error goes here });
  20. Hi @markus_blue_tomato ! Just wanted to ask you, I'm trying to throw a 404 on a controller to invalidate some urls but I am getting stuck on getting a 500 error because the exception doesn't get caught, just wondering if you had any experience tackling something like this. Doing this at the end of the controller: if($input->urlSegment1) { $pageOnSegment = getPageToRender(); $view->set('page', $page); } else{ throw new Wire404Exception(); }
  21. I am using Smarty! For what I understand that shouldn't really matter, but I am not entirely sure.
  22. Hi @gmclelland! I did found the issues you came across, but didn't solve them and also the redirect shouldn't happen before the 404 ? I read on this github issue that this shouldn't happen anymore in version 2 of the module so I went for updating everything but didn't work either still can't throw the exception on the controller.
  23. Hi! Does anyone know how to handle throwing a Wire404Exception so that PW renders the 404 page as it normally does? Getting: Fatal Error: Uncaught Wire404Exception I am using the Smarty Engine. Both the engine factory and smarty engines are on their latest versions. I am using url segments to change the url structure of the site I'm working on. Doing something like this: if($input->urlSegment1) { $pageOnSegment = getPageToRender(); $view->set('page', $page); } else{ throw new Wire404Exception(); }
  24. I hope someone could shine some light if something like this is possible (don't know if you tried it?): CustomRepeaterPage extends RepeaterPage { ... } What I do a lot is on site/ready.php $wire->addHookMethod("RepeaterPage:newMethod", function(){ .. })
×
×
  • Create New...