When i create a view of all registrations, including the submitted form data from my custom fields, I am able to see the results perfectly ... with admin role only. However, the 'Host' role even though i've checked every single permission (for testing purposes only) is not able to see any data which the registrant submitted on registration.

Logged in as 'Host' role, the manage registrations page shows all registrations, but the view page is missing my custom fields. 'Admin' has no problems and can see the custom field data.

Comments

dargente’s picture

should add that i'm getting error "Strict warning: Only variables should be passed by reference in registration_form() (line 31 of /var/www/sites/all/modules/registration/includes/registration.forms.inc)." when registering. not sure if that is a different issue. i am using latest dev version.

dargente’s picture

scratch that...

with a 'registration' view, i am able to get all the registration data using correct relationships. however, the error above is related. the error line is coming from forms.inc:

  elseif (count($who_options) == 1) {
    $who_default = reset(array_keys($who_options));
  }

when i take this statement out, there are no errors, but some profile data is missing from views.

dargente’s picture

Status: Active » Fixed

ok fixed. another post addresses this issue with a patch http://drupal.org/node/1928318#comment-7325568.

dargente’s picture

well it appeared fixed and then now i am not getting values again.

definitely a problem with the code above and patch.

using Views,
i am either getting user data but missing form data,
or vice versa, getting the form data while missing user data.

something is not functioning right in this code:

  $who_options = registration_access_people($registration);

  // default value for who is registering
  $who_default = NULL;
  if (isset($registration->registration_id)) {
    $who_default = $registration->registrant_type($GLOBALS['user']);
  }
  elseif (count($who_options) == 1) {
    $who_keys = array_keys($who_options);
    $who_default = reset($who_keys);
  }

i should add, admin is still able to see all the data in the View,
but the entity host is missing one or another.

dargente’s picture

Status: Fixed » Needs work
dargente’s picture

update:

what i figured out so far is that Profile2 fields in the view are modifying the output somehow.

when Profile2 fields are in the view, i lose the form data.
when Profile2 fields are not in the view, form data appears.

dargente’s picture

update:

i had 2 fields in profile which caused the form data to be blocked.
One was 'Name' using name field, and other was using a taxonomy reference.

For the tax reference, that needs to be uber-specific in the relationship. For example:

Relationships
Registration: User
(User) User: Profile
(Profile) Profile: Location
(term from field_user_location) Taxonomy term: Profile using Location

If not drilled down to term, then adding location field will hold back form data.

Also, the Name.
The only way to get this working properly was by moving the Name field from Profile2 profile into the user account area. Or just remove name from view.

I really don't know if this is a Profile2 or Entity Registration issue. Its just very strange behavior.

busla’s picture

It´s not a profile2 issue since I´m getting the same error not using profile2. I get this on a clean install.

busla’s picture

Wait, I only get this error as an anonymous user. When I log in as admin the error disappears when I reload the page.

busla’s picture

This patch fixed it for me.

Göran’s picture

john.oltman’s picture

Status: Needs work » Closed (outdated)