File/Blueprint errors in PHP error.log

Hey guys,

It seems as though I’m having issues with thumbnails cropping. I know there are a few topics on the subject of thumbnails, but I found some errors on the server that may or may not be related and so I’ve decided to post them in the hope they’re familiar (and therefore easy to fix).

[Tue Apr 19 11:07:51.173460 2016] [:error] [pid 1589] [client 122.150.88.211:51852] PHP Warning:  Missing argument 1 for Kirby\\Panel\\Models\\Page\\Blueprint\\Files::fields(), called in /var/www/html/panel/app/src/panel/models/file.php on line 225 and defined in /var/www/html/panel/app/src/panel/models/page/blueprint/files.php on line 53, referer: http://onemillionviews.com.au/panel/pages/events-exhibitions/testing-event/edit
[Tue Apr 19 11:07:51.173571 2016] [:error] [pid 1589] [client 122.150.88.211:51852] PHP Notice:  Undefined variable: file in /var/www/html/panel/app/src/panel/models/page/blueprint/files.php on line 54, referer: http://onemillionviews.com.au/panel/pages/events-exhibitions/testing-event/edit

I initially thought it might be a permissions issue. I’ve checked permissions on the server and the thumbs directory is writable (755) (owner: www-data), so this shouldn’t be a problem. Saying that, my experience is limited so this is still a possibility.

My thumbnail code (I’ve trimmed it down):

<?php

$events = $page->children()->visible()->flip()->offset(1);

?>

<?php foreach($events as $event): ?>

<?php echo thumb($event->images()->find('hero.png'), array('width' => 500, 'height' => 320, 'crop' => true)); ?>

<?php endforeach ?>

The original images seem to be being displayed instead of the cropped thumbnail.

Any help would be greatly appreciated. Alternatively if this is likely to boil down to the same issue as another thumbnail topic then I’ll close this topic and include my comments elsewhere.

Thanks!

The error message you posted is from the Panel, not from the thumbnail generation. Could you please post the blueprint of the events-exhibitions/testing-event page?

<?php if(!defined('KIRBY')) exit ?>

title: Page
pages: true
files: true
fields:
  title:
    label: Title
    type: text
  text:
    label: Text
    type: textarea
    size: large

Has size: large been deprecated, by any chance?

Yes, size: large is deprecated. But I don’t think the error messages are related to that.