It didn't save endpoint field label.

Errors:
Notice: Trying to get property of non-object in relation_endpoint_field_validate() (line 28 of sites/all/modules/contrib/relation/relation_endpoint.module).
Notice: Trying to get property of non-object in relation_endpoint_field_validate() (line 34 of sites/all/modules/contrib/relation/relation_endpoint.module).
Notice: Undefined variable: delta in relation_endpoint_field_validate() (line 32 of sites/all/modules/contrib/relation/relation_endpoint.module).
Notice: Trying to get property of non-object in relation_endpoint_field_validate() (line 39 of sites/all/modules/contrib/relation/relation_endpoint.module).
Notice: Trying to get property of non-object in relation_endpoint_field_validate() (line 49 of sites/all/modules/contrib/relation/relation_endpoint.module).
Notice: Trying to get property of non-object in relation_endpoint_field_validate() (line 55 of sites/all/modules/contrib/relation/relation_endpoint.module).
relation_nonexistent_type

Comments

mr.york’s picture

Status: Active » Needs review
StatusFileSize
new571 bytes

This patch is simple bugfix.

mikran’s picture

What exactly were you attempting to do when the error occured?

mr.york’s picture

StatusFileSize
new175.88 KB

Path is admin/structure/relation/manage/[relation_type]/fields/endpoints

mikran’s picture

Status: Needs review » Reviewed & tested by the community

Well, since it's not possible to provide any default values for relation endpoints the patch is ok.

chx’s picture

Status: Reviewed & tested by the community » Needs work

No. What you want is a no ui in the field definition. Why the field is on the UI? I thought we added no ui long ago.

chx’s picture

Issue tags: +Needs tests

Ok scratch #5 but still.

mikran’s picture

Status: Needs work » Needs review
StatusFileSize
new1.23 KB

My first shot at writing Drupal tests

chx’s picture

That's one interesting patch, 'cos I do not have a test called testRelationImport.

chx’s picture

StatusFileSize
new1.22 KB

Here's a reroll. I am not going to commit this yet because the test needs to a) use a random label b) check that label actually got saved not just messaged about it. Thanks for the patch so far!

mikran’s picture

Assigned: mr.york » mikran
Status: Needs review » Needs work

testRelationImport was missing with the relation_ui files.

mr.york’s picture

Status: Needs work » Needs review
StatusFileSize
new1.7 KB

I moved test in relation_ui.test file and add randomName label check.

mikran’s picture

StatusFileSize
new1.5 KB

Thanks mr.york, I modified the test a bit. I'll commit if this passes testbot

mikran’s picture

Status: Needs review » Fixed

and committed.

Automatically closed -- issue fixed for 2 weeks with no activity.