I get the following errors when trying to create an entityforms entity using the rules action 'Create a new entity'.
Steps to reproduce:
- fresh drupal install (7.28-dev) with entity API (1.5), entityform 2.0-beta3, rules 2.7
- create a rule with the "Create a new entity" action and make sure it gets triggered (example attached, trigger it by updating a user account)
- The entityform form is not created and you should see these errors:

Warning: Illegal offset type in isset or empty in entityform_get_types() (line 383 of .../sites/all/modules/entityform/entityform.module).

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in EntityAPIControllerExportable->load() (line 742 of .../sites/all/modules/entity/includes/entity.controller.inc).

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in EntityAPIControllerExportable->cacheGetByName() (line 787 of .../sites/all/modules/entity/includes/entity.controller.inc).

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in EntityAPIController->load() (line 219 of .../sites/all/modules/entity/includes/entity.controller.inc).

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in EntityAPIControllerExportable->cacheGet() (line 773 of .../sites/all/modules/entity/includes/entity.controller.inc).

Recoverable fatal error: Object of class EntityformType could not be converted to string in DatabaseStatementBase->execute() (line 2168 of .../includes/database/database.inc).

Comments

firfin’s picture

Issue summary: View changes
tedbow’s picture

Version: 7.x-2.0-beta3 » 7.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new867 bytes

Ok see the problem.

In EntityformController->create()

I was expecting a string but Rules is sending an EntityformType object.

This patch converts that to a string. Not sure if this is the best way to solve it.

Please test.

firfin’s picture

Status: Needs review » Reviewed & tested by the community

Patch from #2 solves the problem for me. No more errors and the entities get created correctly. Thanks @tedbow

tedbow’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for reporting back. Committed

  • Commit 95dad3d on 7.x-2.x by tedbow:
    Issue #2260021 by tedbow, firfin: Errors when creating an entityform...

Status: Fixed » Closed (fixed)

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