this may be a duplicate of #2062073: Filefield path incorrectly removes files from the server but couldnt tell as the discussions was taken offline with no resolution reported.

this has only just started after upgrading core from 7.19 to 7.26

path def: images/[nid]

when the node is first saved it is saved as unpublished. the master img is saved to the correct location.

if the node is edited and re-saved (without setting as published) it works ok.

if the node is again saved and this time set as published; the path def in lost on save and the file is MOVED from the original location to /files (i.e. no path setting).

not sure what in core could have changed this; have also updated a few other modules at the same time i did core update; but none that should impact this.

Comments

liquidcms’s picture

just tested with setting node as published on initial save; and same problem occurs.

liquidcms’s picture

Title: path definition not used when node is published » image deleted when node is published
Project: File (Field) Paths » Plup
Version: 7.x-1.x-dev » 7.x-1.0-alpha1

i had originally thought this was an issue with filefield_paths but now pretty sure it is an issue with plup.

it worked prior to upgrading from core 7.19 to 7.26.

it is ok if the node is not published; but when submitted as published the img is deleted.

reverted back to 7.19 and it works again.

this is with -alpha, i think i tried latest -dev but it doesn't work at all.. but will try it again.

liquidcms’s picture

revisiting this again and i see the problem still exists.

liquidcms’s picture

a little more testing and i can see the issue is a combination of plup and file field paths not working together.