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) »
  • Error when registering for an event
Pages: [1]

Author Topic: Error when registering for an event  (Read 1625 times)

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
Error when registering for an event
November 14, 2013, 10:55:34 am
I've recently upgraded a Drupal 6 site to CiviCRM 4.4.0, and we're seeing an error when just some people try to register for an upcoming event (they've registered for other events before, using previous versions of CiviCRM, without issue). We are also seeing plenty of other people registering for the same event without any problems.

Here's the error message and backtrace:

Nov 14 10:45:38  [info] $Fatal Error Details = Array
(
    [message] => Could not find valid value for id
   
Code: [Select]
=>
)

Nov 14 10:45:38  [info] $backTrace = #0 /home/sites/default/sites/all/modules/civicrm/CRM/Core/Error.php(320): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/sites/default/sites/all/modules/civicrm/CRM/Utils/Request.php(106): CRM_Core_Error::fatal("Could not find valid value for id")
#2 /home/sites/default/sites/all/modules/civicrm/CRM/Event/StateMachine/Registration.php(52): CRM_Utils_Request::retrieve("id", "Positive", Object(CRM_Event_Controller_Registration), TRUE)
#3 /home/sites/default/sites/all/modules/civicrm/CRM/Event/Controller/Registration.php(43): CRM_Event_StateMachine_Registration->__construct(Object(CRM_Event_Controller_Registration), TRUE)
#4 /home/sites/default/sites/all/modules/civicrm/CRM/Core/Invoke.php(318): CRM_Event_Controller_Registration->__construct("Event Registration", TRUE, "null", NULL, "false")
#5 /home/sites/default/sites/all/modules/civicrm/CRM/Core/Invoke.php(72): CRM_Core_Invoke::runItem((Array:15))
#6 /home/sites/default/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#7 /home/sites/default/sites/all/modules/civicrm/drupal/civicrm.module(385): CRM_Core_Invoke::invoke((Array:3))
#8 [internal function](): civicrm_invoke("event", "register")
#9 /home/sites/default/includes/menu.inc(350): call_user_func_array("civicrm_invoke", (Array:2))
#10 /home/sites/default/index.php(17): menu_execute_active_handler()
#11 {main}

Looking at one particular contact that is having this issue, I'm wondering whether it might be related to their relationships or email addresses (they have two 'employee of' relationships and two email addresses, and I wondering whether they are entering different data into the profile exposed on the event sign up form. What i don't understand is why CiviCRM is not able to cope with what they are submitting.

Any input welcome.

Regards
Graham
Graham Mitchell
http://mc3.coop

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Error when registering for an event
November 14, 2013, 12:59:31 pm
Do you run the clear caches scheduled job on your site? By default it runs hourly & it can disrupt contribution page completion so possibly also events
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error when registering for an event
November 14, 2013, 02:01:14 pm

note that that job only clears contribution/event sessions that have not been touched in the last 30 minutes. This is due to the fact that there might be some secure data in the cache. Any active pages should be left untouched. That said, i dont think there are unit tests to ensure that this function works as designed, so might be good to add some there

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Error when registering for an event
November 14, 2013, 02:20:44 pm
Note that if you think this is a possibility you should check out your timezones. Our experience was that this cron needed to be turned off in 4.2 - however, we generally use servers that are behind our users timezone - meaning that the server's concept of 'half an hour old' is problematic.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
Re: Error when registering for an event
November 14, 2013, 11:51:12 pm
This scheduled job was enabled, and there is a possibility of timezone confusion as my server is in a different timezone from my user.
I've updated to 4.4.1, and that might help improve things.
I'll try to register the user myself through the front end and see what happens.

I noted a couple of other event registration errors relating to relationships that had not occurred prior to 4.4.0:

The user attempting to register was presented with the following error message:

"‘Sorry but we are not able to provide this at the moment. Relationship already exists’."

And the backtrace:

Code: [Select]
Nov 11 13:26:06  [info] $backTrace = #0 /home/inca/sites/default/sites/all/modules/civicrm/CRM/Core/Error.php(383): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/inca/sites/default/sites/all/modules/civicrm/CRM/Core/Invoke.php(105): CRM_Core_Error::handleUnhandledException(Object(CiviCRM_API3_Exception))
#2 /home/inca/sites/default/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#3 /home/inca/sites/default/sites/all/modules/civicrm/drupal/civicrm.module(385): CRM_Core_Invoke::invoke((Array:3))
#4 [internal function](): civicrm_invoke("event", "register")
#5 /home/inca/sites/default/includes/menu.inc(350): call_user_func_array("civicrm_invoke", (Array:2))
#6 /home/inca/sites/default/index.php(17): menu_execute_active_handler()
#7 {main}

In the cases that I looked at, the user had two relationships with organisational contacts already, and editing these relationships to ensure that the relationship that the user was referring to when submitting the event registration profile was a 'current employer' seemed to resolve the issue. Again, what i don't understand is why CivicRM is throwing an error in this situation. When a relationship already exists, surely it should simply update the relationship as needed (for example making it a current relationship if it was previously recorded as not current), and get on and complete the event registration. This seemed to work fine prior to 4.4.0.
Graham Mitchell
http://mc3.coop

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Error when registering for an event
November 15, 2013, 01:18:24 pm
WRT the timezone issue - in 4.4.x (possibly 4.4.2 due out next week) on drupal installs the mysql timezone is set when you connect (based on drupal user timezone or site ) - However, this only helps with timezone fields (not datetime fields) - currently things like the change log are timezone fields.

However, an unsupported fix that we have used for the last couple of years is to convert specific fields (like civimail start date & even start & end date) to timezone fields. This means that civimails go out at the right time. For events it causes them to show in the viewer's timezone - which is only useful for some organisations. However, looking at action_schedule - it may be that converting the action_date_time field in action_log table will help but I am not at all sure about this.

re the error -  I had a go at replicating what you described in a test

https://github.com/eileenmcnaughton/civicrm-core/commit/287ab995b7edb9905a438f82ae1e869ded5d823c

but couldn't :-)

(I haven't PR'd the test into core because at the moment my repo has patches not in core which are subject to open PRs)
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Error when registering for an event

This forum was archived on 2017-11-26.