Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Joss

  1. The host has been playing and they keep seeing this in the logs. At this point, I am out of my depth! Error: Exception: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away In /wire/core/WireDatabasePDO.php line 499 1. /wire/core/WireDatabasePDO.php(499): PDOStatement->execute() 2. /wire/core/PagesLoader.php(764): WireDatabasePDO->execute(Object(PDOStatement)) 3. /wire/core/Pages.php(706): PagesLoader->getById(Array, Object(Template), 29) 4. /wire/core/PagesType.php(388): Pages->getById(Array, Array) 5. /wire/core/Users.php(58): PagesType->get(2138) 6. /wire/core/Session.php(180): Users->get(2138) 7. /wire/core/ProcessWire.php(520): Session->__construct(Objec They tried increasing the resources to see if that did anything, but no. It is still failing. One note - the MySQL server is there. It hasn't gone anywhere! Joss
  2. As a tiny update, Kualo, my hosts, are playing with it. They replicate the problem every time, but the logs have yet to cough up anything useful.
  3. I went to update a site today, but as soon as I hit the backup databsase button, it shot to 98% CPU. I tried it on another PW site and that did it when I hit the Upgrade link. Any bright ideas what might be causing it? PHP version? (I am on 7.4 and made the change relatively recently.) Something with HTACCESS perhaps that was changed with the last update I did? (I think I updated the Pro-cache module not long back) I tried turning on Debug, but since the site gets stuck, it doesn't cough up anything. And hello to everyone! Joss EDIT The solution or workaround is not to hit the backup button, but to just backup with phpmyadmin (which I do anyway). However, why it is getting stuck, I am not sure. This seems to be less about CPU overload and more about timing out. See my later post with the reply from the host who has been brilliant.
  4. Just chucking this in here incase anyone else has this problem. Upgraded to the latest dev and it failed (I never get that!!!!!) I got the warning: Warning: require_once(/sites/domain name/wire/core/ProcessWire.php): failed to open stream: No such file or directory in /sites\domain name\index.php on line 32Fatal error: require_once(): Failed opening required '/sites/domain name/wire/core/ProcessWire.php' (include_path='\php\PEAR') in \sites\domain name\index.php on line 32 Turned out it hadn't renamed wire-3xx to wire This was locally using XAMMP. So, if you see this, check: Has it renamed the wire directory, And if everything extracted okay. (I have seen that on another post once, I think). Okay, back to what you were doing!
  5. Beat you to it, @kongondo !!! I do know this stuff (somewhere in my head), but it is so long since I have done any of it that I am struggling to dredge it out!
  6. Got it!! It just took waking my brain up and using the clue from @dragan But, of course, this is inside a function - we have to use wire, don't we!!! $hanna = wire("modules")->get('TextformatterHannaCode'); $buttons = $hanna->render("[[subscribebuttons]]");
  7. Hi @elebx Yeah, I'm okay with the first line, erm, I think. It was how to then get the actual specific code [[subscribebuttons]] and render it within the function, outputting it as part of my $out chain, if you know what I mean.
  8. I am sure I knew how to do this once, or I was dreaming, which is equally as likely. How can I output hanna code INSIDE a function? So, I have this: $hanna = $modules->get('TextformatterHannaCode'); $hanna->render("[[subscribebuttons]]"); Which I would normally use stand-alone. But I want to shove it into something like this in my functions page: function SomeFunction(){ $out ="<div>"; // hanna in here $out .="</div>"; echo $out; } Any clues how to do it without melting the site? Thanks, dear people!
  9. Just found this (or perhaps just remembered it) Perfect for what I needed.
  10. Okay - that was scary Just did an update to .84 dev. Checked the front page - 404! Checked admin - 404! Oh, Bollocks!!! Run into panic, open CPanel, ready to follow the repair instructions. Number One - Rename wire directory to something or delete it. Fine. Scan folder list ..... Still looking... Still looking... Okay, where the HELL is the wire directory? And who has stolen my index.php?????!!!!! Quickly downloaded the latest dev and uploaded missing resources. Working - phew! I have no idea what happened, but when I updated to the lastest dev, it didn't have a wire directory or index.php. ummmmm.....
  11. @Mike Rockett - Apparently, that error will also show on 5.5, which is what the server is running, the company have told me. I will probably migrate at some point.
  12. This is on a shared server and according to phpmyadmin, it is 5.1.73
  13. HI I have installed this on one site with no issues, but running into a problems on another: Module reported error during install (ProcessJumplinks): SQLSTATE[HY000]: General error: 1293 Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause Failed to init module: ProcessJumplinks - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db-name.process_jumplinks' doesn't exist I uninstalled and reinstalled and no joy. I am on PW 3.0.64 I had redirects installed previously, but uninstalled first. Any thoughts?
  14. Joss

    Mad Archive Deleting

    Eventually got it sorted - eek! Aside from finishing deleting, I have now stopped the media side constantly indexing and cleared out thousands of files associated with creating thumbnails for the cloud side which I don't use. (Note, I have had this drive for ages so it is already long past warranty). Everything much faster now. Really this is a lesson in complexity. If you try to be connected to everything all the time as we are pushing to be in our world, eventually it gets so complex that is collapses around you. Chalk and slate had something going for it
  15. Joss

    Mad Archive Deleting

    I will go peek. I also found a post about SSH-ing into it and removing things like hidden files and so on https://community.wd.com/t/hidden-wdmc-directories-created-by-mcserver-and-photodbmerger-and-the-deletion-of-them/91860/8 Though I will research that a bit more first. BIt of a valuable storage this!
  16. Joss

    Mad Archive Deleting

    Not sure how to do that. I wasn't aware it even created thumbnails. I just access it through the network
  17. Joss

    Mad Archive Deleting

    This is just through a windows utility accessing A WD mycloud drive. But I am ignoring it and doing other stuff
  18. Joss

    Mad Archive Deleting

    I decided to have a day of just fiddling with rubbish rather than working on one of my many and varied projects that have yet to make me any money. A good day for archiving. But before I got on with that, I decided to see if I had any directories archived on disks that I could happily delete. These are mostly directories that I copied over to an external drive for safety at some point - not long term backups, but just panicking because I was updating something or whatever. So, on an external WD drive, I found a directory innocently called Documents. Inside, was a maddening mix of docs, old websites (loads of ancient WordPress and Joomla ones), website experiments that never went anywhere, huge amounts of downloads that I never got round to using .... you know the sort of thing. None of this is now needed as it was all emergency backup stuff and the originals are either are somewhere archived proper or were long since deleted and no longer leaded. This directory is ripe for the bin. So, I decided to delete it ..... several hours ago! It is really easy to lose track of things, isn't it? Apparently, I am deleting 205,849 items, and it is taking quite some time. Four hours so far with another 6 hours to go, according to the window. This WD drive better buy me a beer when I have finished!
  19. I could, but this way means I can put it anywhere in the article and make more than one search. It would be easy enough to add an extra atribute to say how many you want returned.
  20. Here is the scenario. You have developed a blog or news site or blog section to your site and you have created a basic tag system using a Page Reference field. How can you add related articles easily? This is one way by using Hanna code. I like this method because it gives me the choice of showing or not showing related articles and choosing the tag. My articles use a template called basic-page which includes a Page Reference field called tags. This is a multiple select field. I have created a Hanna code called "tagsearch" and given it the attribute "tag". In my textarea field it is used thus: [[tagsearch tag="fish"]] The Hanna code simply searches the title field of the tags pages for the single term and returns the pages that have that tag. I have limited the results to 8. From the results, we pluck the title field of the pages, the small image that I use for my thumbnail, and the url. However, we do not want to also return the page we are displaying, so we simply eliminate it by making sure that that none of the results have the same page name. Here is the commented Hanna code. <?php // Find the pages that use the specified tag $articles = $pages->find("template=basic-page, tags.title=$tag, limit=8"); // Start the loop foreach($articles as $article){ // Check we are only displaying articles that are NOT the current page if($article->name != $page->name){ // Add a thumbnail, but check it is there so we don't get errors if($article->image_small){ echo "<a href='{$article->url}'><img src='{$article->image_small->url}'></a><br>"; } // Grab the article title echo "<br><a href='{$article->url}'>{$article->title}</a>"; // end the check to make sure we do not show the current page } // end the loop } And that is it.
  21. I know this is an old post, but I just came across it while having the same problem. In the end, I have gone for a quick jquery solution. My field is within two divs, articlecontent and box, so I have made it very specific. $('.articlecontent .box p > img').unwrap(); This also takes into account images with captions - it doesn't effect those since they are not in a p tag in the first place. And that is that.
  22. Dave - yep, in context. That was the phrase I was looking for! Bernhard - that might do it. I rather like that idea of removing checkbox values. Could save clutter.
  23. I should have added that this is only in Inline mode. In normal mode it works fine.
  • Create New...