Closed (duplicate)
Project:
Inline
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
11 Sep 2006 at 10:37 UTC
Updated:
17 Aug 2008 at 14:50 UTC
Jump to comment: Most recent file
this is a cummulative patch. http://drupal.org/node/82697 and the preview is fixed.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | inline.module.img-preview.patch | 762 bytes | sun |
| #1 | image.php.txt | 319 bytes | he_who_shall_not_be_named |
| inline_2.patch | 3.89 KB | he_who_shall_not_be_named |
Comments
Comment #1
he_who_shall_not_be_named commentedIt needs this file 'image.php' in the inline directory
Comment #2
Bèr Kessels commentedAFAIK I already fixed the previews in HEAD (runs on Drupal 4.7)
Comment #3
sunyes, already contained in inline HEAD (4.7 compatible) without the need for an additional php file.
Comment #4
he_who_shall_not_be_named commentedYou are wrong. The temporary directory is not accessible for the browser on 99% of cases. So, becouse the preview link contains an image from that directory, this will not work only on systems which permits browser access to the temporary directory (very unsafe). That is why the php is included. Please do a deeper test.inline
Comment #5
he_who_shall_not_be_named commentedThis patch is for the HEAD. :)
Comment #6
sun1. What kind of "preview" are you talking about? Inline does not support any kind of preview ATM.
2. By using the term "temporary directory", do you mean private file access configured through Drupal file settings?
3. If you provide patches, only include changes for one issue please, so everyone is able to relate to code changes for that issue.
Comment #7
he_who_shall_not_be_named commented1) I am talking about the node preview (blog, story ...)
2) Hm. The old code contains a file_directory_temp(). see: http://api.drupal.org/api/HEAD/function/file_directory_temp
I did't mean the private access.
The returned src for the old code, in previews, will be a temporary file from a temporary directory (/tmp) accessible by Drupal but not for the browser.
3) Sorry for that but I have no cvs and I compared my previously fixed code with the HEAD.
Comment #8
he_who_shall_not_be_named commentedTo reproduce add/edit a post, upload a new image and press preview. The preview works for previously submitted nodes (because images are copied from the /tmp to the drupal_site/files on submit).
Comment #9
Bèr Kessels commentedThe patch here fixed this: http://drupal.org/node/63826 please move over there and see wether that fix had problems of some kind, that I am not aware of.
Comment #10
he_who_shall_not_be_named commentedIt is not fixed. Do a test with the temporary directory (/tmp) inaccessible for the browser. See my previous comments.
Comment #11
sunAn easy fix for this is to use a temporary directory that is accessible to the webserver/end user.
If we want to get this in, we need a integrated solution. For example, I could imagine to render new attached image uploads with
src="inline/upload/filename.ext"that is processed by a new inline menu item registered with the pathinline/upload.I don't know if upload.module already provides streaming functions. If it does, we should use them instead.
Comment #12
sunAttached patch should fix this issue leveraging the Drupal framework. Please test.
I could not reproduce this issue - maybe this is because I'm on Windows or was just testing against a local Drupal installation. The introduced code could be moved to inline_prepare_file_object(), though.
Comment #13
sun@vrencianz: Have you been able to test the latest patch?
Comment #14
he_who_shall_not_be_named commentedI didn't test it because I'm using a modified version of it.
Comment #15
sunReverting status.