If you have anon registration enabled and are using Civicrm, the email field does not display for anon users signing up.

Comments

Anonymous’s picture

Assigned: Unassigned »
Torenware’s picture

Using the CVS version of EF, I'm getting UI that says: "Login to register for this event". user/register does ask for email.

Is there a setting that enables registration for anonymous users? I haven't found one yet.

Torenware’s picture

My bad. I found where it is down in the settings (admin/settings/eventfinder/registration_settings). With the appropriate setting, I see the "Register For This Event" UI, and I see the problem. Investigating.

Torenware’s picture

StatusFileSize
new4.94 KB

I have a patch for this, which is against Drupal CVS.

Patch is not perfect, and should get review. Several known problems:

  • It turns out that CiviCRM *always* strips the email field when used for reg in Drupal. I am working around this, but it may be that my fix will break if CiviCRM's behavior changes.
  • There are some cosmetic problems. First, my inserted email field themes slightly different from the CiviCRM fields, since I am using Drupal 4.6 form APIs, which look different from CiviCRM's form items.
  • There are other cosmetic problems I've discovered which are probably distinct bugs.

It does seem to address the issue, though.

Torenware’s picture

Version: 4.6.x-1.x-dev » master
StatusFileSize
new103.61 KB

I've taken a look at the CiviCRM related code in the CVS version. With a lot of help from Lobo and Dave of openngo, here's an updated version that resolves this issue.

This code depends upon a couple of patches to CiviCRM v. 1.3. You can test the current version on http://beta.civicspacelabs.org/trunk/, which has a patched version of CiviCRM 1.3 running.

Torenware’s picture

Status: Active » Needs work
StatusFileSize
new103.07 KB

I have a patch that will resolve this issue, although there are other problems with the code that will need resolving before EventFinder will work with CiviCRM 1.3. Specifically, the ef_register table is currently using the "uid" field for both the CRM contact_id and the Drupal uid, and there are definitely cases in the code where the usages clash (specifically, if a registered drupal user uses anonymous registration; in this case, the value of ef_register.uid is essentially undefined).

The patch does set up the call to create editing UI (crm_get_profile_html), and works correctly for registration for authenticated drupal users.

One click works, but not correctly: if an authenticated user has not entered "enough" information (i.e., al of the required fields of the CRM profile used with EF), the user will still be allowed to register anyway, with no error. There's no good fix for this with CRM 1.3, but CRM 1.4 will have an API to catch this kind of error.

I'm going to upload this file twice: first, the file as it has been tested against CivicSpace 0.8.3 RC5, and then as a patch against Drupal CVS.

Torenware’s picture

StatusFileSize
new11.83 KB

Here's the patch again Drupal CVS 1.14.