Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
----------------------------
Comment | File | Size | Author |
---|---|---|---|
#7 | webfm-attachment-gone-on-node-edit-689236-7.patch | 1009 bytes | nhck |
Comments
Comment #1
JGO CreditAttribution: JGO commentedbtw I tried the patch in http://drupal.org/node/598516 but no luck
Comment #2
nhck CreditAttribution: nhck commentedAs 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?
Comment #3
Peter Arius CreditAttribution: Peter Arius commentedI'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
Comment #4
cgmonroe CreditAttribution: cgmonroe commentedA 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).
Comment #5
paulhudson CreditAttribution: paulhudson commentedhey, 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.
Comment #6
nhck CreditAttribution: nhck commentedrealworksmedia, 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?
Comment #7
nhck CreditAttribution: nhck commentedPeter,
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.
Comment #8
paulhudson CreditAttribution: paulhudson commentedHey nhck,
Cheers, I run Atomic Sercured Linux so that's probably the cause.. strange it doesn't like an encoded URL!? :-/
Head in sand ;-)
Comment #9
nhck CreditAttribution: nhck commentedIssue #689236 by nhck | JGO: Fixed Attachment gone on node edit.
Comment #10
nhck CreditAttribution: nhck commentedComment #11
nhck CreditAttribution: nhck commented