Jump to content

David Beesley

  • Posts

  • Joined

  • Last visited

About David Beesley

  • Birthday 06/07/1983

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Gloucester, UK

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

David Beesley's Achievements

Jr. Member

Jr. Member (3/6)



  1. Hi @BitPoet Thanks again for you work on these modules. I have it all installed, the two server components on a Blank install of Processwire, and the two client components on a test version of a current client site. Both sites are hosted on an internet visible server (on the same IP address). I have configured both ends, but they aren't talking to each other. When I click "Connect/Refresh Server" on the client website it alerts "Invalid or empty response from server" I have added some screenshots of my configs with sensitive data removed. But the client secret and ping from server have never had any data in them
  2. Hi All, Say I have a set of pages from the API. What is the easiest way to to get all unique values from a given text field on each page?
  3. Hi All, We have a client with a requirement to change the content of one of their pages at midnight on a given day. I understand there is a module for scheduling the publishing and unpublishing of entire pages, but his would require two separate pages and urls, not good for SEO. Is there a way/module to schedule changes to a given field on a page?
  4. @diogo Thanks for the update. I'll be honest with you, like most things in this profession I have inherited it from a predecessor and that bit was working so I left it alone. I have done loads of micro-optimisations through this process, so may add yours to it. I'm now also thinking that because debugging is off, and was the primary cause of the memory bloat (I hate the term memory leak), I may not need the multiple nulls, unsets and forced garbage collector cycles.
  5. @BitPoet I owe you an apology. I hadn't turned debug off properly. Once I did that the memory usage held between 25Mb and 40Mb. A drastic reduction
  6. Hey @netcarver Thanks for bringing WireQueue to my attention I'll have a look through the forum thread to see how this could be implemented in my case. @BitPoet I have tried turning debugging off and I end each foreach loop thusly $page = null; // null out page object unset($page); // remove pointer to page object (null) in memory wire('pages')->uncacheAll(); // clear the page cache gc_collect_cycles(); // force invoke the garbage collector But there is no discernible change in memory usage @kongondo I'm unsure how I would implement your example. My page creation process is $page = wire('pages')->get("parent={$parent_page->id}, this_id={$page['id']}"); // where this_id & $page['id'] are this entities id in the api if(!$page->id) { // CREATE new page $new_page = new Page(); ... // Some generic fields // save $new_page->save(); $page = wire('pages')->get($new_page->id); // Set my page object to this new page } ... // Set some more fields based on API data // save $page->save(); (nulling and unsetting omitted for clarity) Thanks all for your help so far. This is a great community
  7. No joy I'm afraid memory usage BEFORE page creation: 19656360 memory usage AFTER page creation: 19735712 memory usage BEFORE page creation: 19735712 memory usage AFTER page creation: 19815680 memory usage BEFORE page creation: 20493800 memory usage AFTER page creation: 20652664
  8. I have tried using wire('pages')->uncacheAll(); That didn't seem to do anything. I'll try your more fine grained approach.
  9. Hi All, On one of our PW sites, we are importing data from an external API into the processwire database. The import contains around 450 "Objects" and on average each of these objects has around 20 sub-objects. This means I am creating around 9,500 pages during the initial full import (subsequent imports only make amends and additions) The problem here is I seem to be hitting the php memory limit. I have already upped it to 256Mb, and don't really want to up it further. I am nulling and unsetting everything I feasibly can, so the memory bloat now appears to be in the process of page creation. I am nulling the object after each page is fully saved, and can see the destructor method is running. So cannot fathom why I have this memory bloat. The bloat appears to be around 120kb, per page created. Which means currently I'd need over 1Gb dedicated to this process for it to complete. Is there something I have missed?
  10. Hi folks, I have been asked by Pete (my boss) to pick up the ball and run with it, as he is quite keen to have a centralised solution for monitoring versions and updates. Having worked with Wordpress, Perch and Umbraco in my time, I must say this is the nicest CMS I have has the joy of using (Perch is a very close second). It seems to be very well maintained by a core of hard working individuals, but has yet to reach the size where it is a target for crackers and script kiddies. That said, with it being our CMS of choice, we don't want fragmentation to be come a problem. I remember the groans that went around the office of a former employers when we needed to make a change to an Umbraco 4 website. I'd be interested to know if anyone has had any success with developing a solution for this? @BitPoet thanks for being so pro-active and working on a prototype, although it looks like you haven't had chance to make a commit to it since January. Understandable, you have to pay the bills and keep the lights on rather than maintaining a side project for some guys you have never met. Perhaps we could have a quick chat on Slack, DM or similar about the project and see if we can pick it up and help develop a solution with/for you? In the meantime, I'll have a good poke around and see how it works on a test installation. Thanks all
  11. This will only be client facing, and we have outlined that we will not be supporting below IE9. So based on the can i use stats, we are fine with DOMContentLoaded http://caniuse.com/#feat=domcontentloaded
  12. I have worked around it now, but adding an event listener for DOM ready document.addEventListener("DOMContentLoaded", function(event) { var app = document.getElementById('app'); app.innerHTML = '<p>It Works</p>'; });
  13. Hi All, I am developing an admin tab for a site using Ben Byford's tutorial here -> https://webdesign.tutsplus.com/tutorials/extending-the-processwire-admin-using-custom-modules--cms-26863 So far so good, it's working and showing me some content. The ultimate aim for this is to be an interface with an external API. So I am looking to develop it as a mini Vue.Js single page app. I can inject the javascript for the app using the following code in my template $config = wire('config'); $config->scripts->add($config->urls->templates . "scripts/app.js"); The javascript is currently just grabbing a div with the id "app" and inserting "Hello World". 'use strict'; var app = document.getElementById('app'); app.innerHTML = '<p>Hello World</p>'; The problem is, presumably because the JavaScript is injected into the HEAD. I'm not grabbing the element 'app', app.js:4 Uncaught TypeError: Cannot set property 'innerHTML' of null Can anyone suggest a better approach for adding JavaScript to the admin area?
  14. Can I bump this? Or could someone point me to where it has been added if it already has?
  • Create New...