Closed (fixed)
Project:
ImageField
Version:
5.x-2.0-rc6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
6 Mar 2008 at 19:19 UTC
Updated:
27 Mar 2009 at 01:20 UTC
Jump to comment: Most recent file
1. cck 5.x - 1.6-1
2. imagefield 5.x-2.0-rc6
3. Complete permissions
4. download public files
5. imagefield witch default configuration
6. expected results:
I want to upload an image to the image_field and, inmediatly after upload or when click preview button, I want to view the image uploaded
7.Unexpected actual results:
I view an "image not found" icon, and I have a Page Not Found entry in Logs for each image.
I looked at the file folder and see that the image doesn't upload until I click submit button.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | imagefield.module-230848-13.patch | 3.23 KB | darren oh |
| #6 | imagefield.module-230848.patch | 1.09 KB | darren oh |
Comments
Comment #1
ingacosta commentedComment #2
ingacosta commentedComment #3
dopry commentedThe image will not be in the final destination on preview. There is a menu callback that handles displaying the image... I'll see if I can reproduce later. Do you have clean-urls enabled? they shouldn't be required, but something you can test.
.darrel.
Comment #4
jpoesen commentedCheck out an imageapi issue: http://drupal.org/node/236911#comment-777252.
Also check out these imagefield issues:
http://drupal.org/node/229965
http://drupal.org/node/230881
http://drupal.org/node/174075
Could these all be related?
Comment #5
jgoldfeder commentedI'm having the same issue. When you upload a picture it does not show on the resulting page, however it does show upon submit. I have drupal handling the images, not open http in file settings.
Comment #6
darren ohSame problem as issue 130701 on the DRUPAL-5 branch. When the download method is public and the site does not support clean URLs, file_create_url() will return a path to a file that does not exist and the menu system will not be used. Here's a patch to test.
Comment #7
dopry commentedI cannot reproduce with and with out clean urls.. using the DRUPAL-5--2.
Comment #8
dopry commentedComment #9
darren ohdopry, you can't reproduce this if your site supports URL re-writing. If you use Apache, try disabling mod_rewrite and restarting.
Comment #10
dopry commentedDoesn't work with private files, rewrite enabled and clean urls.
Comment #11
dopry commented@DarrenOh,
This came up with imagecache I believe and we had to implement a custom file_create_url there. It may be the same here. We should generate a test case for this issue. I'd be happy to write the test, but what we really need to know is how the real and preview URLS should look in the following cases...
public files, clean urls on
public files, clean urls on
private files, clean urls off
private files, clean urls off
If you can create that set of URL's I'll write a test case we can work with to resolve this issue.
Comment #12
darren ohI'll work on it.
Comment #13
darren ohCorrect URLs:
The problem with the current code is that
file_create_url()will always generate http://example.com/files/directory/image for public files. The solution is to place the menu path in$file['preview']and useurl()instead. Patch attached.Comment #14
darren ohComment #15
ingacosta commentedthank you very much for your help, I will test your patch.
Thanks again
Comment #16
MGParisi commentedWhere is the DEV for 2.1? It only lists DEV for 1.X
Comment #17
pedrofaria commentedGood Job... work so fine for me!
Comment #18
darren ohLooks like pedrofaria forgot to change the status.
Comment #19
quicksketchThanks Darren Oh. Committed to the 5.x branch.
Comment #20
quicksketch