Hi,

When I attached a file to a node, it's gone when editing the node later on :s
It's still attached to the node as long as I don't edit it. When I really edit it and save, it's gone!

----------------------------
JGO | http://www.e2s.be
----------------------------

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JGO’s picture

btw I tried the patch in http://drupal.org/node/598516 but no luck

nhck’s picture

Category: bug » support
Priority: Critical » Normal

As mentioned in #598516: Problems with many modules (FastToggle, Draggable Views, Editable Fields...) it could be an interference with some module. If it is possible I would like you to disable modules one-by-one and check if that causes the problem. Furthermore you should try if there is some kind of problem w/ your theme?

Peter Arius’s picture

I'm experiencing the same problem.

Drupal 6.19
Garland theme
PHP 5.2.11
Multi-language site
Web File Manager 6.x-2.12

other enabled modules:
ACL 6.x-1.2
Content Access 6.x-1.2
Administration menu 6.x-1.6
Blog 6.19
Book 6.19
Comment 6.19
Contact 6.19
Content translation 6.19
Database logging 6.19
Forum 6.19 Enabled
Help 6.19
Locale 6.19
Menu 6.19
Path 6.19
Poll 6.19
Profile 6.19
Search 6.19
Statistics 6.19
Taxonomy 6.19
Throttle 6.19
Tracker 6.19
Trigger 6.19
Update status 6.19
Upload 6.19
... required core modules, of course...
SpamSpan 6.x-1.4
Simplenews 6.x-1.3
Nodewords 6.x-1.11
Nodewords - basic meta tags 6.x-1.11
Nodewords - extra meta tags 6.x-1.11
Nodewords - site verification meta tags 6.x-1.11
Advanced help 6.x-1.2
Global Redirect 6.x-1.2
Google Translate links 6.x-2.0
Node_Type_Filter 6.x-1.2
Pathauto 6.x-1.x-dev
QA Checklist 6.x-1.0-beta2
Site Documentation 6.x-1.2
Sub-path URL Aliasing 6.x-1.1
SuperCron 6.x-1.3
Synonyms 6.x-1.0
Taxonomy Browser 6.x-1.4
Token 6.x-1.14
TokenSTARTER 6.x-1.14
Url alter 6.x-1.2
German Stemmer 6.x-2.0-rc1
Cumulus 6.x-1.4
Tagadelic 6.x-1.2
Access Permissions Fieldsets Manager 6.x-2.3
System Module 6.x-2.3
Util 6.x-2.3
Views 6.x-2.11
Views UI 6.x-2.11

When I find the time, I'll try again on a vanilla D6.19 installation etc.

Best regards,
Peter

cgmonroe’s picture

A couple of quick debug things are:

Try it in a browser that has a JavaScript error console (E.g. Firefox or Chrome) and see if there are any Javascript errors listed. This might give a clue to what's going on.

If you have FireFox, try using FireBug to see what is happening on the Ajax calls.

I also wonder if this is related to the "preview bug" issue. There was (is?) a problem if you attach files and then preview the node. Since the attachments haven't been fully committed, there were some "state" issues in remembering what had been added during the preview...(or something like that).

paulhudson’s picture

Category: support » bug
Status: Active » Needs review

hey, I had this problem.

When I change:
postObj = { action: encodeURIComponent("attach"), param0: encodeURIComponent(node_url) };

to:
postObj = { action: encodeURIComponent("attach"), param0: node_url };

It works fine. (Around line 3230 in webfm.js)

Without this change the webfm_ajax callback returns 403 and the function doesn't proceed past:
if (isset($_POST["action"])) {

I've tried this with jquery 1.6.4 and 1.3.2. Let me know if you'd like me to test further and if there are any obvious ramifications of not encoding the url. :-)

I've changed this to a bug report for now in the hope it's reviewed.

nhck’s picture

realworksmedia, it would be a real help for me if you could describe more in detail what your actual problem is/was because

Your suggestion essentially does the following:
When we create and attach webfm upon editing a node - the list of attachments is searched for and attached to the node for display (thats the list of attachments you see when the node is edited). In order to do this the node-url is gotten from the node-edit form, so we can tell which node this file-listing belongs too. What webfm does is to get the url, encode it, send it to drupal for processing which decodes it. The url is encoded in order to prevent charset/transfer screw ups. So I wonder how not-encoding the url should change a behavior?

nhck’s picture

Peter,

I have a solution for you as in the attached patch. The reason for this happening was the usage of the Sub-path URL Aliasing module.

As for realworksmedia I have reviewed your report and I think this might be related to your server configuration. 403 error means access denied - if this stops happening when you change the code in that way then it might be a security module going off. Its not related to webfm anyway b/c webfm does not return that status in that part of the code. Sorry.

Thank you guys for testing the patch - I hope this will solve the problem.

paulhudson’s picture

Hey nhck,

Cheers, I run Atomic Sercured Linux so that's probably the cause.. strange it doesn't like an encoded URL!? :-/

Head in sand ;-)

nhck’s picture

Status: Needs review » Fixed

Issue #689236 by nhck | JGO: Fixed Attachment gone on node edit.

nhck’s picture

Version: 6.x-2.11 » 6.x-2.17
nhck’s picture

Status: Fixed » Closed (fixed)