Jump to content

netzartist

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by netzartist

  1. Hi,

    on a client website I've enabled error notification and sometimes I receive such mails with this message:

    Page: http://www.domain.com/?/
    User: ?
    
    Error: 
    Exception: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 111 (in /kunden/bla/wire/core/ProcessWire.php line 143)
    

    What does this mean? Is this normal? Or a kind of hacking attempt? Anything I can do to prevent this? Or just ignore it? ... :)

    Thanks

    Jan

  2. Hi,

    I have the idea to manage the PW templates within a github repo and using a kind of post-commit hook to copy/push changes directly into the site/templates-folder on my own server. That way I'd only need to pull/push in github - no need to synch the files manually...

    I've read the post-receive hook guide on github. I think it's not that easy because the pw templates folder of course is not accessible via a URL like www.mydomain.com/site/templates ;-)

    Does anyone have a glue how I can automatically synch my templates files from github to the pw template folder??

    Thanks!

  3. Hi!
     
    I've just started developing my first PW project (it's great so far! :)) and ran into an issue about how to output an thumbnail image:
     
    I want to iterate over news items which have an images repeater (field type "image", inputfield type "image") and display resized images:
     
    foreach($page->children as $news_item) {
      ...
      if (count($news_item->image_repeater)>0) {
        foreach ($news_item->image_repeater as $image) {
          <?= $image->width(250)->url; ?>
          <img src="<?= $image->width(250)->url; ?>" width="250" alt="" title="<?= $image->description ?>" />
        }
      }
    }
    I get an
    "Error: Exception: Method RepeaterPage::width does not exist or is not callable in this context (in ...\wire\core\Wire.php line 232)".
    $image returns an ID. 
     
    The "image" fieldtype has the setting maximum files allowed = 1 (0 didn't work too).
     
    PW Version 2.2.13.
     
    Any idea?
     
    Thx  :)
×
×
  • Create New...