• Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By FrancisChung
      Hi PW Community,
      I have a problem where a page is loading up fine on my local dev machine + 1 of the test sites, but not on another test site.

      They have identical PW (2.8.35?) and codebase installed.
      The 2 sites are hosted on the same hosting provider, as well as our other sites.
      1) Error Logs. There is nothing particularly strange logged on the PW Error log for all the sites. I am getting a "You must assign a template to the page before setting custom field values (title__data) [pageClass=Page, template=] (WireLog)" error, but I'm getting this error on working pages as well.
       However, there are some errors in our Hosting Provider's log. The error seems to point at some sort of permissioning issue regarding reading the image files?
      1.a) File / Dir permissions of Images  - I've checked file permissions on the normal and problematic sites. They are all identical
      2) .htaccess  -  I've tried running the .htaccess file from the working site on the problematic site - No Luck
      3)  codebase - I've done 3 comparisons. They are identical on all sites.
      4) wire directory - See above
      5) Behaviour - So the problematic site loads up most of its page as expected without problems. It's just a couple that it has issues with.
       
      Problematic URL Example  : http://kinder-reime.com/kindergedichte/kategorien/gedichte-fuer-kindergarten-und-schule/
      Working URL : http://finger-spiele.com/kindergedichte/kategorien/gedichte-fuer-kindergarten-und-schule/
      I've also attached the KIS Error Logs.
      Has anyone come across  behaviour like this before and what would be the way forward to fix this?
      KIS.Error.Logs
    • By cosmicsafari
      Hi all,
      I am working on a module which creates templates, fields & pages upon install.
      I have ran into an issue where I have a numerous fields which I would like to override their labels depending on the template they are used in.
      Is it possible to do this dynamically via API at the point where I am creating the field group and template using the API.
      The following is the code which I am using at the moment.
      foreach($templatesArray as $name => $cTemplate) { if(array_key_exists('fieldGroup',$cTemplate)) { $fg = new Fieldgroup(); $fg->name = $name . '-fg'; foreach ($cTemplate['fieldGroup'] as $field) { //possibly at this point? $fg->add($this->fields->get($field)); } $fg->save(); } $t = new Template(); $t->name = $name; $t->fieldgroup = $fg; $t->noChildren = 1; $t->setIcon($cTemplate['icon']); $t->save(); } Is this even possible?
    • By cgohio
      We had an outside vendor help develop our website.  The vendor has closed their business.  I'm trying to modify 1 of the images near the bottom of our website but can't figure out how.  We're new to processwire.  I see how I can modify the individual pages but can't seem to figure out where to go to change this image n www.gchbs.com near the bottom  I attached the image that I need to change.  Thanks in advance for any of your help!

    • By MilenKo
      Hello all.
      I am trying to find a way to have a query with all pages that were published on a specific date (today for example). I read a few posts where people had a specific date field and were limitting the results by that, however is there a way to filter results without a specific date field? As far as I am able to publish the timestamp using $page->created logically I should be able to filter by the result of it? What is the best way to accomplish a filter for a day, week, month etc.?
    • By louisstephens
      I have been scratching my head on this one for a while, so I thought maybe someone could shed some light on this issue. I am using a grid layout (that I have created over the years) with a class for responsive images (very similar to bootstrap, but very stripped down). Using this, I created a gallery using a foreach loop, and included a "print button" to print each image. I got the classes and everything worked out, but I ran into a small problem with the print functionality. My images (which are around 2400px wide to fill the space) are just fine in the grid and on resize, but when I print, they "run off" the page. I understand that they are just too big to be printed in portrait mode, which led to me think that I could use $image->size(); to print a scaled down version of the image (which adds a bit more load time as now the site needs to load the image large scale and the scaled down version). However, I can't seem to wrap my head around serving just the scaled down version for print only (obviously display:none; doesn't do the trick). Has anyone tackled this before, or does anyone know of a more elegant solution to the conundrum that I have found myself in?
      The Foreachloop:
      $printclass = 1; foreach($page->galleries as $gallery) { $printclass++; $printimage = $gallery->gallery_image->width(600)->url; $out = ""; $out .= "<div class=\"row\">"; $out .= "<div class=\"grid-12\">"; $out .= "<img src=\"{$gallery->gallery_image->url}\" class=\"reimage\"/>"; $out .= "</div>"; $out .= "</div>"; $out .= "<div class=\"row\">"; $out .= "<div class=\"grid-12\">"; $out .= "<a href=\"#\" onClick=\"printCoupon('printable{$printclass}');\">Print</a>"; $out .= "</div> "; $out .= "</div> "; $out .="<div id=\"printable{$printclass}\"><img src=\"{$printimage}\"/></div>"; echo $out; }