After updating to Kirby 2.3 the thumbnails on my project pages are not rendering. Things worked fine in the previous Kirby version.
If I check the thumbs folder I see the projects folder and subfolders and in the subfolders there is only 1 “thumbnail” but it is the same size as the original image. I have turned debug on and this is the output I get:
<b>Fatal error</b>: Uncaught Error: Call to undefined method Asset::source() in C:\MAMP\htdocs\site\templates\project.php:20
Stack trace:
0 C:\MAMP\htdocs\kirby\toolkit\lib\tpl.php(22): require()
1 C:\MAMP\htdocs\kirby\kirby\component\template.php(85): Tpl::load('C:\\MAMP\\htdocs\\...', NULL, true)
2 C:\MAMP\htdocs\kirby\kirby.php(619): Kirby\Component\Template->render(Object(Page), Array)
3 C:\MAMP\htdocs\kirby\kirby.php(607): Kirby->template(Object(Page), Array)
4 C:\MAMP\htdocs\kirby\kirby\component\response.php(29): Kirby->render(Object(Page))
5 C:\MAMP\htdocs\kirby\kirby.php(686): Kirby\Component\Response->make(Object(Page))
6 C:\MAMP\htdocs\index.php(16): Kirby->launch()
7 {main}
thrown in <b>C:\MAMP\htdocs\site\templates\project.php</b> on line <b>20</b><br />
here’s part of my project template ( line 20 is the third line in this case)
<div class="section group">
<?php foreach($page->images()->sortBy('sort', 'asc') as $image): ?>
<div class="col span_1_of_3">
<a class="gallery-item" href="<?php echo thumb($image)->source()->url(); ?>"><img src="<?php echo thumb($image, array('width' => 300, 'height' => 200, 'crop' => true))->url(); ?>"></a>
</div>
<?php endforeach ?>
</div>
Since my PHP knowledge is very limited I hope someone can help. Thanks in advance!