Hi,

i'm unable to create a new redhen note via rules. I have to set the author and host entity, but when set the current drupal user (as an example) i get the error-log message: "Unable to create entity redhen_note: Entity property author doesn't support writing."

I have to set an other user for the note, not the current. when creating a contact entity, everything is working fine.

maybe there is a workaround to set the author after creating and before saving the entity? or anything else i can set as author entity while creating a new one, or creating a note entity in general?

i'm thankful for any help...

Comments

brubakerburns’s picture

Issue summary: View changes
tchopshop’s picture

I ran into this problem too. I created a component with a VBO of a list of Contacts to move the information from a text field on the contact to a note. I created a Rule and created the new Note entity. Then I added the Author entity as current logged in user. I got that same error: Entity property author doesn't support writing

I changed it to the contact:author and am not getting that particular error anymore.

However it still won't create the note entity. Now I get:
Unable to create entity redhen_note": Invalid data value given. Be sure it matches the required data type and format.

The only other things to change would be the Host entity, which is the Contact.

So I have no idea why this won't work.

tauno’s picture

Version: 7.x-1.7 » 7.x-1.x-dev

Setter callbacks need to be added for these properties. Should be a fairly easy patch for someone to cook up if we don't get to it first.

levelos’s picture

Status: Active » Fixed

Took a quick stab at adding the missing default getter and setters in 7782e48.

  • levelos committed 7782e48 on 7.x-1.x
    #2286063 by levelos: Add missing entity metadata getters and setters in...

Status: Fixed » Closed (fixed)

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