Using a node form with a multi-imagefield, no file uploaded and active updating enabled, filefield_paths still tries to move the (non-existant file).

FileField Paths failed to move file () to (test1/test1-filefield-fid.jpg).

("test1" and "test2" are correct local settings)

CommentFileSizeAuthor
#2 filefield_paths.module.patch475 bytesdelapohl

Comments

delapohl’s picture

I'm experiencing this same issue. If the field is left blank, "The selected file /var/www/dev could not be copied" is displayed in the UI, and the above-captioned error is logged.

delapohl’s picture

StatusFileSize
new475 bytes

Here's the quickie workaround I implemented in my install just now.

digi24’s picture

Status: Active » Needs review

Patch in #2 works for me. Thanks delapohl.

3dloco’s picture

Hello Delapohl,

Thanks a lot for your patch....I was also experiencing the same issue, applied patch #2 and the error is gone. However, it looks the changes create conflicts with File Aliases.

The conflict that I am having is that after saving the node, I get text injected in all of the text fields for that node. Note that this text injection only occurs when I have "Display Alias" + "Active Updating" enabled on the filefield.

For example, for a node with the following settings:
title:TEST
description:This is a test.
filefield display alias: on and set to files/images/[title].jpg
filefield active updating:on

I get the following text injected into every text field:
files/imagesTfiles/images/Efiles/images/Sfiles/images/T

@Digi24 It would be most helpful to know whether you are using File Aliases and if so, if you are experiencing the same issue.

Thanks,

KH

digi24’s picture

@Digi24 It would be most helpful to know whether you are using File Aliases and if so, if you are experiencing the same issue.

No sorry 3dloco, I am not using file aliases.

But judging from the simple patch delapohl provided, I think your text injection problem is a separate issue, probably related to the regexp routines in file_aliases_filefield_paths_process_file

deciphered’s picture

Hi guys,

Will try to make some time to look into this ASAP, but unfortunately I have a lot going on IRL at the moment so I would appreciate if you could grant me some patience.

 

@3dloco

I am aware of some issues with file aliases and alias replacement in the body field, which does require a good amount of testing. It is only when replacing the values in the body/cck textfields though, so try to avoid doing that for the time being. Aliases in the normal display of FileFields should still be fine.

Cheers,
Deciphered.

3dloco’s picture

Hello Deciphered,

Filefield paths with File Aliases makes for a great combo and appreciate you looking into this.

It is only when replacing the values in the body/cck textfields though, so try to avoid doing that for the time being

I understand from your advice above that I should avoid for the time being using text field tokens for aliases when active updating+display alias is enabled (tokens like [title]). Did I understand right...can you please clarify.

Thanks!

KH

dokuf’s picture

Hello Deciphered,

Any news on that issue?

Regards,
dokuf

agileware’s picture

Patch #2 works for me, plus 1 and all that ;)

neilnz’s picture

Status: Needs review » Reviewed & tested by the community

This patch seems to fix my problem of "could not copy /var/www" when I remove an image from a node. +1 from me, and might as well be RTBC, it's such a simple patch.

deciphered’s picture

Status: Reviewed & tested by the community » Needs work

Not to cause anger, but the patch is not a fix, it is a workaround.

I will not commit it in it's current form, but I will try to make some time to reproduce and fix the cause of the issue.

j0nathan’s picture

Same issue as #1.
Subscribing.

alliax’s picture

issue sill active, did you have time to look into this?

Berliner-dupe’s picture

Same issue.
Patch from #2 dont help.

arojoal’s picture

+1

szy’s picture

+1 :/

szy’s picture

Sorry guys: actual dev release (2011-Jul-03) solves the problem.
Thanks! :]

Szy.

deciphered’s picture

Status: Needs work » Fixed

Marking as fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Liaz’s picture

Good to know it was just coming from the active updating checked - thanks