Download & Extend

Improved error message for Referencing to the file used in the field is not allowed

Project:FileField
Version:6.x-3.10
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

If a content type has many filefield CCK fields, using multigroup for example, it is hard to determine which field is causing problems when getting the following errors:

Referencing to the file used in the %field field is not allowed.
OR
The file referenced by the %field field does not exist.

Amending the error message to include the filename would allow the troublesome files to be identified with greater ease.

Comments

#1

Attached suggested patch

AttachmentSize
improved_error_messaging-1545692-1.patch 1.02 KB

#2

Oops, should have been $file->filename

AttachmentSize
improved_error_messaging-1545692-2.patch 1.01 KB