Hello,

I have taxonomy_image module installed.

In its configuration panel I set :
General Options / Picture image path:
sites/default/files/category_pictures

I succesfully patched Drupal core 6.20 and ImageCache module.
ImageCache images URL are OK.
But now taxonomy_image URLs lost their prefix "sites/default/files/" and it generated 404 error when trying to access them.

Do you think its could be due to Drupal Core patch ?

Thanks for your help.

Comments

wim leers’s picture

Title: Problem with URL generated with taxonomy_image module » CDN + Taxonomy Image: Problem with generated URLs
Project: CDN » Taxonomy Image
Version: 6.x-2.x-dev » 6.x-1.x-dev
Component: Origin Pull mode » Code

It's probably because Taxonomy Image is generating their image URLs incorrectly. Let's ask the maintainer.

nancydru’s picture

Because of issues with moving databases between servers, I deliberately removed from the file path the part that could be reconstructed from the settings. It worked fine for me, but seems to have been not so good for others. I believe there is a patch in the issue queue that fixes that.

wim leers’s picture

I'm not sure how you're generating file URLs, but you should use file_create_url() and you should pass it the full path relative to the Drupal root directory. This is the behavior Drupal 7's file_create_url() requires and it's also required for compatibility with the CDN module (which includes a backport of the aforementioned file_create_url()).
If you choose to not support this, that's fine, but then your module will be incompatible with the CDN module in Drupal 6 and I'll just document that. It's your call :)

nancydru’s picture

I do recreate the full path internally (I really do test things before I commit them), but what is in the files table is not a complete path.

wim leers’s picture

I'm not accusing you of doing things incorrectly. Drupal 6 simply allows both behaviors: full path or only the path relative to the site's "files" directory.

So, do you pass the full path to file_create_url()?

nancydru’s picture

wim leers’s picture

And would you be willing to change that? :)

srobert72’s picture

@Nancy : Do you think it could be include in your module ?

srobert72’s picture

@Nancy : this patch works http://drupal.org/node/438378#comment-3613220
It solves URL problem when using CDN.

Could you include it in DEV release of your module ?

ufku’s picture

Status: Active » Closed (duplicate)