Hi I am using D6.20 and Filefield Paths 6.x-1.3.
I am also using Modal Frame API 6.x-1.4 and Node Relationships 6.x-1.2. (to have, for nodereference fields, the possibility to add a new referenced node in a modal frame)

I have a content-tye "Document" with a filefield set up to store uploaded files in a particular folder.

Filefield paths does not work for nodes created (and so file uploaded) in a modal frame.

These files are put in the filesystem root folder "sites/default/files".

If then I edit the node and save it again, the path is updated to the desired one.

Can you help me?

Comments

deciphered’s picture

I'm gathering it would take quite a bit of messing around to setup my dev environment to match yours, so I'll ask the stupid question before attempting to reproduce this issue.

When you say the file is being uploaded to 'sites/default/files' not the destined folder, do you mean as soon as you upload them or after you save the node? Because as the node information is unknown until the node has been saved, the files aren't moved to the destination folder until the node is saved, and stored temporarily in the default folder until this point.

If the files aren't moved even after saving the node, then there is definitely a problem.

Let me know, and if there is definitely a problem, let me know how to reproduce the issue as best as possible.

Cheers,
Deciphered.

gp.mazzola’s picture

Hi Deciphered,
thank you for your answer. I mean after I save the node, so I think there is a problem.
Ok I tell how to reproduce it. I tested it again right now. You need obviously CCK, FileField, Filefield Paths and Nodereference. I used latest version of all.

Then:

Create 2 content types, let's say "Container" wich will have a nodereference to item nodes and "Item" wich will have the filefield.
So add a FileField to Item content type, and set some path in the FileField Paths' options. (Now if you create an Item node and upload a file, it goes to the right directory in the file system)
Then add a nodereference field to Container content type, and select as widget Autocomplete Text Field. Then set it to reference Item nodes. It does not matter if you allow or not multiple values.
Now if you enabled Noderaltionship, you should have in the configuration page of the Container content type a last Tab named "Reltionships". Select it and then choose "node reference extras"; the path is:

/admin/content/node-type/[content_type_machine_name]/relationships/noderef

Here you check the "Create and Reference" checkbox and "Search and Reference View" as Table Style.

Then you are done with the setup.

Now go to create a Container node, and on side of the nodereferece field you should have the buttons added by noderelationships module so that yu can view and reference existing nodes, or add and a new one and reference it. Both in the modal frame.
So you click on the create and reference button (the green +).
This should open a node add form for an Item node in a modal frame. You fill it with title and upload a file in the filefield and click on save. This should save the node and reference it automatically. Then save the parent node.

Now if you go to check the Item node created, the file is in the wrong position and if you check your filesystem the file it has not been moved to the directory you chose, but it is in the root.

I hope that I have given all the details and I have been clear enough. If you need more details, just tell me.
And thank you again :)

Ciao,
G.Paolo

deciphered’s picture

Hi,

Thanks for the information, that was extremely helpful and I have managed to replicate and confirm the issue.
Have not yet resolved the issue, but wanted to let you know that I am looking into it.

Cheers,
Deciphered.

gp.mazzola’s picture

Glad to be helpful!
Thank you for your time and helpful module!

G.Paolo

6lv1’s picture

Hi, is there any update on this?

I have the same problem with the same modules.

Thanks.

deciphered’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

No longer supporting Drupal 6 issues for this module.