Closed (fixed)
Project:
Entity Registration
Version:
7.x-1.x-dev
Component:
Registration Core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 May 2012 at 22:38 UTC
Updated:
9 Jun 2012 at 16:10 UTC
Upgraded to the latest releases of entity and entity registrations and now get this error whenever I try to submit a registration:
Fatal error: Call to a member function internalIdentifier() on a non-object in .../sites/all/modules/registration/includes/registration.entity.inc on line 284
Also tried latest dev of both these modules with the same results. What up? Help! Please!
Comments
Comment #1
levelos commentedYou likely have an older version of Entity API than is required.
Comment #2
digitopo commentedUsing the following version of entity API:
; Information added by drupal.org packaging script on 2012-05-11
version = "7.x-1.0-rc2+2-dev"
core = "7.x"
project = "entity"
datestamp = "1336695251"
which is the latest version available from the project page
http://drupal.org/project/entity
Comment #3
digitopo commentedI figured out what the problem was:
Here is the code that the error message is referring to:
In my registration states settings, there was no default state checked, so when it tried to process the new registration it could not find a default state to apply.
So this isn't a problem with the entity module, maybe that conditional should be written differently or the user should be forced to select a default state.
The reason I wasn't using a default state is because I deactivated all the registration states, since I don't want to use any of them.
Comment #4
levelos commentedI see. How did you manage to deactivate all states? The system requires states, they are not optional, and you must have at least one that's set as the default.
Comment #5
digitopo commentedat /admin/structure/registration/registration_states
there is an array of check boxes for each state. I just unchecked them all.
I didn't know this. It makes sense though at least internally on the backend. But you don't necessarily want users to see the states.
Also FYI, to fix the error I just checked the "default" box next to the "confirmed" state, but did not check the "active" check box. I'm pretty sure it's applying the default state despite not being "active" since it showed up after submitting a registration.
Comment #6
levelos commentedWe may be missing some validation and need better messaging. Hey, it's still beta!
They won't unless you mark them as unhidden.
Comment #9
30equals commentedI actually got the same problem after installing 7.x-1.0-beta2, i have registration types, and there are actually no states defined... ?
That's why my default state was NULL. Now that i manually created a state and set it as default, saving a registration works...
Comment #10
jerdavisClean install from the development branch had states set correctly. Also wouldn't hurt to use/try the dev branch of entity api. At least as of around nowish.