Hi thanks for the module.

Is it possible to check when a user has created an entity or field?

Comments

j_ten_man’s picture

Not currently but it can be added via the API. Are you looking for when an admin creates a new bundle of an entity or adds a field to an existing bundle? Or are you looking for something for when an end user saves a new entity instance?

ocamp’s picture

Hi thanks for responding.

I'm trying to check when an end user saves a new entity instance.

j_ten_man’s picture

What type of entity? Right now, there is already support for nodes out of the box. Making it more generic would probably be fairly easy.

ocamp’s picture

im using profile 2 and commerce. So trying to check when am end user has created a profile, and when an end user has created a product.

j_ten_man’s picture

This is actually going to be very tough because of the way Checklists are setup. The primary reason is because of the ability to restrict navigation around the site with checklists. The entity info does not contain any information about the url that is used to create a new entity - that is left up to the module creating the entity. Because of this, there's no way to handle the ability to say whether or not a page is the url to create a new entity or not.

The workaround to this is to provide an interface where the user can enter in specific urls on an item when adding it to a checklist. While it's not perfect, I'm not sure of any other way to handle a generic entity handler.

j_ten_man’s picture

Assigned: Unassigned » j_ten_man
Status: Active » Needs review

Pushed up initial fix for this and it will be in the next dev release. A quick note, as I mentioned above, the automatic handling of urls does not work because there is no way to get that information from entities in general. To overcome this, I have added some new settings to the item page which will allow you enter in any urls you would like to be allowed.

For example, if you want a user to create a comment entity on a node, you would need to enter the following into the url field: comment/reply/2 (Assuming that nid is 2 that you want the comment created). If you want the user to create a page node entity, then you would need to enter node/add/page.

Let me know if you have any questions.

j_ten_man’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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