CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • BUG: 4.2.* Duplicate registrations for the same role unless the role is default.
Pages: [1]

Author Topic: BUG: 4.2.* Duplicate registrations for the same role unless the role is default.  (Read 672 times)

Generic

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
  • CiviCRM version: 4.2.*, 4.5.*
  • CMS version: Joomla 2.5.*
  • MySQL version: 5.1.*
  • PHP version: 5.3.*
BUG: 4.2.* Duplicate registrations for the same role unless the role is default.
February 12, 2013, 06:21:08 am
Joomla 2.5.*
CiviCRM 4.2.* (up to 4.2.7 at time of forum post)

ISSUE
Only the default role set in the event management configuration will recognise duplicate participants.

RECREATE (I have recreated in http://joomla.demo.civicrm.org)
1. Add 'role select' to a profile
2. Add role profile to event configuration
3. Register multiple times with a role other than the default set in the event management.
4. Register with the default role
5. Now try and register again with any role and duplicate will be recognised.

PLEASE SEE SCREENSHOTS TO HELP EXPLAIN
« Last Edit: February 12, 2013, 11:42:11 am by Generic »
Document everything!
Zim-Wiki

Generic

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
  • CiviCRM version: 4.2.*, 4.5.*
  • CMS version: Joomla 2.5.*
  • MySQL version: 5.1.*
  • PHP version: 5.3.*
Re: BUG: 4.2.* Duplicate registrations for the same role unless the role is default.
February 12, 2013, 07:38:20 am
I recommend you add to your non production server and test.

One of my sites has been having the same contact written over several times because the same email address had been used in each registration. The only way to tell this has happened is to go through the receipts. I know there is a feature to handle multiple registrations under the same email address but I don't want to use this.

THE FIX (for 4.2.7)
/CRM/Event/Form/Registration/Register.php
LINE: 1457
FIND
Code: [Select]
$participant->role_id = $self->_values['event']['default_role_id'];REPLACE WITH
Code: [Select]
//$participant->role_id = $self->_values['event']['default_role_id'];
UPDATED PATCH TO STOP DUPLICATE REGISTRATIONS EVEN IF THE DUPLICATE ROLE IS DIFFERENT
By commenting out the $participant->role_id it will disable role checking and just use participant status to check if the participant is already registered.
« Last Edit: February 21, 2013, 04:49:53 pm by Generic »
Document everything!
Zim-Wiki

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: BUG: 4.2.* Duplicate registrations for the same role unless the role is default.
February 13, 2013, 05:58:20 am
Generic :

Can you try this patch :
https://fisheye2.atlassian.com/changelog/CiviCRM?cs=45641

It will allow you to register with each role only once, irrespective of role being default or not.

HTH
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Generic

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
  • CiviCRM version: 4.2.*, 4.5.*
  • CMS version: Joomla 2.5.*
  • MySQL version: 5.1.*
  • PHP version: 5.3.*
Re: BUG: 4.2.* Duplicate registrations for the same role unless the role is default.
February 13, 2013, 10:54:25 am
Hi Yashodha

Thanks for looking at this.

Your fix works until the user logs in, then regardless of what role the Oops! message is shown disallowing the user the register with another role.

I still think the multiple role registration needs work.
Its too easy for someone to use a single email address and register one or more participants which will result in only the last participants contact record being captured.

Some suggestions:

1. Add a notice such as: "you are already registered as a XXX if you would like to register with an additional role click continue"
2. Add multiple role select as an option for the form profile.

I would like to disable multiple role registration so is my above code change any good to achieve this?

Generic
« Last Edit: February 13, 2013, 11:00:40 am by Generic »
Document everything!
Zim-Wiki

Generic

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
  • CiviCRM version: 4.2.*, 4.5.*
  • CMS version: Joomla 2.5.*
  • MySQL version: 5.1.*
  • PHP version: 5.3.*
Re: BUG: 4.2.* Duplicate registrations for the same role unless the role is default.
February 21, 2013, 04:49:01 pm
COULD SOMEONE PLEASE CONFIRM THIS

If I comment out
Code: [Select]
$participant->role_id = $self->_values['event']['default_role_id'];to disable role checking and just use participant status to check if the participant is already registered.

Will this be okay to restrict registrations to a single role registration per individual.

Thanks
Generic
Document everything!
Zim-Wiki

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • BUG: 4.2.* Duplicate registrations for the same role unless the role is default.

This forum was archived on 2017-11-26.