Closed (fixed)
Project:
Relation
Version:
7.x-1.x-dev
Component:
API
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Dec 2011 at 10:02 UTC
Updated:
16 Sep 2013 at 13:49 UTC
Jump to comment: Most recent file
Comments
Comment #1
toolin commentedThis seems to me a pretty significant issue - a validation error causes relation_save() to silently fail.
There may be other plans for validation, but for now simply re-throwing the exception would be an improvement.
For anyone who encounters this, a FieldValidationException has an attribute errors, an array of error codes and messages. So to see what went wrong look at $e->errors . You need to hack the code in relation.module to re-throw the exception like this:
Comment #2
matglas86 commentedThis bug is mentioned here #1395092: Relation fields not getting saved and here #1350588: relation_endpoint_field_validate() should also check if entity is_new when testing if the relation is unique. The last issue is visually affected by it. This needs to be fixed for experience use at least. Maybe just a drupal_set_message() to mention what went wrong.
Comment #3
mikran commentedThe attached patch adds watchdog error.
Comment #5
mikran commentedtypo.
Comment #6
mikran commentedPatch committed
Comment #8
aaronbaumanSo, now we're successfully logging that an exception occurred, but not actually logging the exception message.
Comment #9
aaronbaumanNevermind, I see the exception message is no more descriptive either.