Hi there,

I have a big problem with David Perssons Media plugin. The situation
is as follows, i have a model that uses the Media plugin, and in the
beforeSave handler deletes files from the media directory (original
file and versions).

Deletion of the files occours in separate methods, each method uses a
find operation to retreive the records data that is about to be
updated. Here's the essential part of the code:

http://pastebin.com/bb3b9WTG

Now the problem is that the file operation, unlink in this case
(though for example rename causes the same problem), seems to cause
the following find operation in the _deleteVersions method to fail,
$record is always empty, where as it works fine in the _deleteOriginal
method. When removing the delete call the record is fetched correctly.
This odd behaviour is somehow connected to the Media plugin, 'cause
when removing it, the find operations works fine even with the file
delete operation.

I've tested it on Windows 7 x64 with PHP 5.3.1 and on Linux/Ubuntu
with PHP 5.2.12 and 5.3.2, the same behaviour everywhere, and i'm at
my wits' end, i have no clue what exactly is causing the problem.

Anyone ever experienced something like that?

Regards

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to