In the registration_status function, it doesn't look like the entity is loaded or defined, causing this issue to occur:

Notice: Undefined variable: entity in registration_status() (line 1075 of /modules/contrib/registration/registration.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

japerry’s picture

Working on a patch :-)

japerry’s picture

Status: Active » Needs review
FileSize
634 bytes

Patch goodness!~

jhm’s picture

I am afraid that patch doesn't work since entity_load returns an array of entities, but

$registration_type = registration_get_entity_registration_type($entity_type, $entity);

expects a single entity object. The patch should be

$entity = entity_load($entity_type, array($entity_id));$entity=$entity[$entity_id];
$registration_type = registration_get_entity_registration_type($entity_type, $entity);
ezra-g’s picture

Status: Needs review » Needs work

Marking as "needs work" per #3.

Matt V.’s picture

Status: Needs work » Needs review
FileSize
672 bytes

The patch from #2 worked for me, at least in terms of eliminating the error. But I went ahead and created a new one, based on jhm's code above.

levelos’s picture

Status: Needs review » Fixed

Thanks gang. Registration depends on Entity API, so used entity_load_single().

Status: Fixed » Closed (fixed)

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

  • levelos committed 267f05b on 7.x-1.x, panels, any-entity, slots, integrations, hold_state
    #1899384: Entity isn't passed into registration_status.