I'm using a module called revisioning which is set up so that users can view revisions, e.g. path:
http://www.mysite.com/node/xxx/revisions/xxx/view
However, when a user has droped an image into the body of a node the url source path rendered is
../../sites/www.mysite.com/files/users/user2/image.jpg
Therefore, it is perfectly visible in the node view http://www.mysite.com/node/xxx but not in the revision view above. How can I change the widget so that it gives me an image source path from the root? Like so:
/sites/www.mysite.com/files/users/user2/image.jpg
Thanks
CCK 6.x-2.6 ; Public ; file systems path: sites/www.mysite.com ; multisite install ;
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | drupal_drag_and_drop.jpg | 206.78 KB | djipp11 |
Comments
Comment #1
quicksketchHmm, I don't quite understand this problem. How is your user dragging a file into the body area? ImageField itself isn't responsible for paths within the Body area at all.
Comment #2
djipp11 commentedSorry, I'm referring to the widget field that appears with when you use CCK to add a file upload of the image type. It allows you drag an image to the body of the text. Is this a widget that is available from CCK and exploited by ImageField / FileField or is it a part of the two latter modules? - I'm not sure on this.
Comment #3
quicksketchUnless this is something your browser is providing, I'm not sure where this functionality comes from. Perhaps a screenshot of what you're describing would be helpful. As far as I know ImageField and FileField do not provide anything to assist in inserting content into textareas.
Comment #4
djipp11 commentedScreendump attached below.
I have been having a tought that that this could be any of the following modules fouling this up, including:
- revisions
- cck
- WYSIWYG (TinyMCE)
- FileField / ImageField
- something else
What I'm getting in the text editor when I drag a image in is a src link that won't view in both of the following edit urls...
node/XXX
node/XXX/revision/XXX
So if I add the image when I'm editing in
node/XXX/edit
it will only be viewable in
node/XXX and not node/XXX/revisions
(and visa versa).
Checking out the url paths with rich text disabled yields the following...
../../sites/www.mysite.com/files/
when editing in
node/XXX/edit
and
../../../../sites/www.mysite.com/files/
when editing in
node/XXX/revision/XXX/edit (functionality from revisioning module)
I am currently trying to set up a filter with regular expression to get round this but this is could be a problem for this cck image widget approach and other modules' future compatibility etc. I can appriciate this might not be anything to do with this ImageField, but if you do have an idea of what this could be, could you point me in the right direction.
Cheers!
Comment #5
quicksketchHuh, I didn't know you could drag into textarea like that. It looks like this is a Firefox thing, it's not provided by any module or code that Drupal provides, it's just something that Firefox makes available everywhere. There might be some interaction going on in your WYSIWYG editor, since if I just drag an image into a textarea it only includes the URL, not a full IMG tag.
As an alternative, you might investigate the Insert module, which places IMG or A tags into WYSIWYGs by clicking a button next to the uploaded file.
Comment #6
djipp11 commentedNo this featrue is available in IE and all good browsers. There is a video for it somewhere, which claims that this is "the future of Drupal" and I quote from the front page of the FileField mod...
"ImageField: Upload widget for FileField that shows an image preview, with support for ALT and Title text."
I might re-post this to the revisions module issue list as it might be something for them to worry about.
Cheers!
Comment #7
quicksketchDragging an image preview into the body does exactly what you'd expect I suppose: it puts the SRC of the preview image into the body. This isn't a feature of ImageField to insert the image into the body in any way, so I'm closing this issue.