I have a
case content-type that has an
image_field. I have configured the field to use a default image in cases when no image is upload for a case.
I then try to render the image using the following code:
<?php $view = node_view($node); ?> <div class="search-result-case"> <div class="search-info"><?php print t('Publicerad'); ?>: <?php print date('d - M - Y', $node->created); ?></div> <div class="search-snippet"> <?php print render($view['field_image']); ?> </div>
If the case has a connected image then the field is rendered as expected, but in other cases nothing in displayed. When I check under recent log messages I see this:
Location http://localhost/test/sites/default/files/styles/case_170x107/public/default_images/default_case_pic_0.png?itok=CWr6R4Rs Referrer http://localhost/test/search/node/case Message Unable to generate the derived image located at public://styles/case_170x107/public/default_images/default_case_pic_0.png.
I don't understand why it fails to generate a style for my default image when it works fine with user supplied images.
I have checked the permission on the folder and everything seems fine, so I really don't understand why this is not working?
Notice that all other images that is uploaded gets their image styles generated without any problem. The error only gets triggered in case of a default image connected to the