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 CiviMember (Moderator: Deepak Srivastava) »
  • Error on send mail on membership renewal for receipt
Pages: [1]

Author Topic: Error on send mail on membership renewal for receipt  (Read 2556 times)

sbrawner

  • Guest
Error on send mail on membership renewal for receipt
March 26, 2008, 07:56:26 am
This is a strange error that only occurs when our membership administrator renews a membership or adds one and attempts to send a receipt.  The error DOES NOT occur when the administrator account does the same thing.

This is on CiviCRM 2.0.1 under Joomla.  The same error occurred with 2.0b3.

Code: [Select]
"Sorry. A non-recoverable error has occurred.

is not of the type Integer"

And from the CiviCRM.log:

Code: [Select]
Mar 26 08:45:25  [info] $Fatal Error Details = Array
(
    [message] =>  is not of the type Integer
    [code] =>
)


Mar 26 08:45:25  [info] $backTrace = /home/britishc/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php, backtrace, 265
/home/britishc/public_html/administrator/components/com_civicrm/civicrm/CRM/Utils/Type.php, fatal, 167
/home/britishc/public_html/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO/Contact.php, escape, 798
/home/britishc/public_html/administrator/components/com_civicrm/civicrm/CRM/Member/Form/Membership.php, getEmailDetails, 447
/home/britishc/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/StateMachine.php, postProcess, 166
/home/britishc/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php, perform, 63
/home/britishc/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php, perform, 195
/home/britishc/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php, handle, 95
/home/britishc/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php, handle, 223
/home/britishc/public_html/administrator/components/com_civicrm/civicrm/CRM/Contact/Page/View/Membership.php, run, 165
/home/britishc/public_html/administrator/components/com_civicrm/civicrm/CRM/Contact/Page/View/Membership.php, edit, 188
/home/britishc/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php, run, 431
/home/britishc/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php, contact, 98
/home/britishc/public_html/administrator/components/com_civicrm/admin.civicrm.php, invoke, 56
/home/britishc/public_html/administrator/components/com_civicrm/admin.civicrm.php, civicrm_invoke, 32
/home/britishc/public_html/libraries/joomla/application/component/helper.php, require_once, 162
/home/britishc/public_html/administrator/includes/application.php, renderComponent, 130
/home/britishc/public_html/administrator/index.php, dispatch, 67
/home/britishc/public_html/administrator/index2.php, include, 14


Any ideas?  The user that this occurs to is designated as an admin on the site but not super admin.

Update: I have confirmed that this error occurs when logged in as any user other than the site administrator.
[/code]
« Last Edit: March 26, 2008, 10:17:34 am by sbrawner »

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 on send mail on membership renewal for receipt
March 26, 2008, 11:03:55 am

1. what version of joomla (i think u r using 1.5.x)

2. i checked the code and it basically gets the CiviCRM contact ID from the session and sends it to the function. In your buggy case it seems like the userID is not present, which is quite wierd. Can you add some debug statements and confirm that. Also can you check the number of entries in your civicrm_uf_match table and if your user has an entry in that table

thanx

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

sbrawner

  • Guest
Re: Error on send mail on membership renewal for receipt
March 26, 2008, 11:17:41 am
I am running 1.5.1stable and just upgraded to 2.0.1 CiviCRM.  The problem existed in 2.0b3 as well.

When you say it gets the contact ID from the session, do you mean the admin user's ID or the editing/member contact ID?  does CiviCRM use its own session handler or does it use Joomla's jos_session db handler? Or cookie?

If you tell me what specifically you are looking for with the debug func I can try.  I'm not a coder.

Correct me if I'm wrong but isn't the CiviCRM ACL control internally turned off with Joomla integration?

Also, is it correct that CiviMember uses the SMTP function and not CiviMail when performing this function, and if so, should it use the static settings in the global config? Or does it use the admin user's mailfrom?

16 entries in civicrm_uf_match:

Code: [Select]
Full Texts  id System generated ID. uf_id UF ID uf_name UF Name contact_id FK to Contact ID domain_id Which Domain owns this contact (cached here for ease of use reasons)
Edit Delete 1 62 NULL 1 1
Edit Delete 2 63 NULL NULL 1
Edit Delete 3 64 NULL NULL 1
Edit Delete 4 76 NULL NULL 1
Edit Delete 5 77 NULL NULL 1
Edit Delete 6 78 NULL NULL 1
Edit Delete 7 79 scottydawg@xxxx.com 383 1
Edit Delete 8 80 NULL NULL 1
Edit Delete 9 85 wecramer@xxxx.net 277 1
Edit Delete 10 83 NULL 404 1
Edit Delete 11 81 NULL NULL 1
Edit Delete 12 84 mrroki@xxxx.net 251 1
Edit Delete 13 86 NULL NULL 1
Edit Delete 14 87 NULL NULL 1
Edit Delete 15 88 NULL NULL 1
Edit Delete 16 89 NULL 405 1

The user in question is not in there and the scottydawg one is, that was the other admin account I used to test issue.



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 on send mail on membership renewal for receipt
March 26, 2008, 11:25:11 am

This bug has nothing to do with acl's, email or smtp :)

CiviCRM uses the joomla session. We expect to see the userID in the session for a logged in user, dont find it, hence the fatal error

You'll need to figure out the reason we dont have the userID in the session. We are not officially supporting 1.5.x with CiviCRM v2 and hence you'll need to help trace it down (and hopefully provide a patch for it)

If you can reproduce this on joomla 1.0.x, we'd like to get ssh access to the box. will make fixing it much easier and quicker

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

sbrawner

  • Guest
Re: Error on send mail on membership renewal for receipt
March 26, 2008, 11:55:33 am
Aha got it.

Would it make a difference if Joomla is using db session handler versus file?

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 on send mail on membership renewal for receipt
March 26, 2008, 12:10:32 pm

i dont think so. but then again with any bug, u never know what/where the issue(s) is till you find and fix it :)

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

sbrawner

  • Guest
Re: Error on send mail on membership renewal for receipt
March 26, 2008, 12:28:23 pm
OK I will try some stuff and see what happens. I will go back to file session handler and see if that makes it better. I'm not using any kind of caching on the site since it tends to break a lot of things.

What is weird to me is that this error does not occur when using the default administrator account.
« Last Edit: March 26, 2008, 12:32:23 pm by sbrawner »

sbrawner

  • Guest
Re: Error on send mail on membership renewal for receipt
March 26, 2008, 02:37:17 pm
Problem appears to be in the civicrm_uf_match table. It's not linking user accounts in J with C user numbers properly.

I manually entered the link info into the table and then logged out of joomla and back in and the mail membership thing worked properly.

I will investigate this issue more to find out why the synch is not working properly.

Thanks for the tips Lobo.

Update: Looks like if you change the email address in Joomla for any reason, even if you change the corresponding email in the contact record for Civicrm, the uf match is irretrievably broken. Manually editing the  table in SQL is the only way to fix it.





« Last Edit: March 26, 2008, 03:17:30 pm by sbrawner »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Error on send mail on membership renewal for receipt

This forum was archived on 2017-11-26.