Details
-
Type: Bug
-
Status: Open
-
Priority: Trivial
-
Resolution: Unresolved
-
Affects Version/s: 4.6.20
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
We have a site where we called Activity API after receiving inbound email to activity.
- When calling API Activity,Create, we call CRM_Activity_BAO_Activity::create().
- This calls CRM_Core_BAO_File::processAttachment()
- Which calls CRM_Core_BAO_File::filePostProcess()
If we update the activity via API after processing inbound email with attachment, or probably when using web UI also, then CiviCRM will throw a fatal error because it cannot rename() the attached file into place on the second update. (The file was already rename()d, so it's not there any more. But Activity,create tries to repeat the move.)
I've got a rough patch which prevents the issue (by exiting null from the file move instead of fatal) but think this may be part of a bigger cleanup, so PR will be WIP only at this point.
Eileen has some work on activity processing, and I've spotted a few other issues while testing this out, eg CRM-9484 CRM-19131