thumbnails will not display

orionvortex - September 19, 2006 - 13:15
Project:ImageCache
Version:HEAD
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I installed the newest version of imagecache. I set up a preset with the extension 'files'. Set it to scale. Updated the action. Update preset and then flushed images. Also, after the install I checked with the directory 'files' and couldn't find that imagecache created any directories inside that folder so I created them myself and set the permissions on directories to 0777.
Next I created some article pages through CCK, imagefield and contemplates. In the teaser I used the code

<?php foreach((array)$field_article_image as $item){
print
'<a href="'.$item['filepath'].'"><img src="/test_site/files/imagecache/'.$item['filepath']. '"></a>';}?>

I then began creating articles. The thumbnails are not appearing. I click for the properties of the missing image and it shows up http://www.chibabeat.com/test_site/files/imagecache/files/plumeriasand.j... which would be the correct url of the image if it were in that folder. The thing is that when I create nodes thumbnail images are not going into the directory i specified. Actually, nothing is in the directory.
My .htaccess file for the 'files' directory looks like the following
# ** Originaly set by Drupal
#SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
# Options None
# <IfModule mod_rewrite.c>
# RewriteEngine off
# </IfModule>

# Modified for use with imagecache.module
Options +FollowSymlinks

I can't figure out what I am doing wrong. Note though, I'm not using phptemplate engine and am running on a standard version of spreadfirefox theme. I saw something in the readme about adding
print theme('imagecache', $preset_namespace, $image['filepath']), but I figured this was meant to be in phptemplate engine so I have never fooled around with this code. Does anyone have any idea what I have done wrong? You can see where I am trying to get the pictures to display at http://chibabeat.com/test_site/frontpage

#1

RobRoy - October 5, 2006 - 05:32

Try this instead:

<?php
print theme('imagecache', 'name_of_your_preset', $field_name_of_your_cck_imagefield_field[0]['filepath']);
?>

Or, loop through the array like that. Basically your missing the preset_name in the URL:

<img src="/test_site/files/imagecache/preset_name/'.$item['filepath']. '">

#2

dopry - October 12, 2006 - 21:28
Category:bug report» support request
Priority:critical» normal
Status:active» fixed

yeah you should be using testsite/files/imagecache/files/filepath you need the preset namespace to follow imagecache for it to work.

#3

Anonymous - October 26, 2006 - 21:30
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.