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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Error on creating a person
Pages: [1]

Author Topic: Error on creating a person  (Read 983 times)

mathran

  • Guest
Error on creating a person
May 06, 2008, 04:39:54 am
Hello,

I hope, that I put this post in the correct chapter/topic.

I do work with a multi-site enviroment in combination with Drupal.
Each user belongs to a group and per group there is a civicrm enviroment.
My main site is www.mainsite.com.
This mainsite has it's own private civicrm database / domainid=1.
If somebody enters the system then he will go to hisgroup.mainsite.com.
This subsite has its another civicrm database (shared) with it's own domainid.
Everything is organised in directories and setttings files.

Quering the system works fine but, adding data gives some errors.
I know by now that the problem must come from the session state of drupal and civicrm. But I cann't find the correct php code or call to civicrm to reset the session state.
I have read : http://issues.civicrm.org/jira/browse/CRM-2667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel.
but hat did not help me.
I have tried to use the command : hisgroup.mainsite.com/civicrm/admin?sessionReset=2
That did not help me either.

For information the error code giving by the system is:
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_log (entity_table , entity_id , data , modified_id , modified_date ) VALUES ('civicrm_contact' ,  250 , 'civicrm_contact,250' ,  2751 ,  20080506113336 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`civicrm_20_test_ver/civicrm_log`, CONSTRAINT `FK_civicrm_log_modified_id` FOREIGN KEY (`modified_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_log (entity_table , entity_id , data , modified_id , modified_date ) VALUES ('civicrm_contact' ,  250 , 'civicrm_contact,250' ,  2751 ,  20080506113336 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`civicrm_20_test_ver/civicrm_log`, CONSTRAINT `FK_civicrm_log_modified_id` FOREIGN KEY (`modified_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_log (entity_table , entity_id , data , modified_id , modified_date ) VALUES ('civicrm_contact' ,  250 , 'civicrm_contact,250' ,  2751 ,  20080506113336 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`civicrm_20_test_ver/civicrm_log`, CONSTRAINT `FK_civicrm_log_modified_id` FOREIGN KEY (`modified_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]"]
)

What can I read to solve the problem ?
Are there some lines of code that I can add to my drupal module that resets the session ?
The last solution would be very fine.

Thanks a lot,
Martin

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error on creating a person
May 06, 2008, 04:53:16 am
Quote
I have tried to use the command : hisgroup.mainsite.com/civicrm/admin?sessionReset=2

Before trying this you need to have your enable your debug mode. http://wiki.civicrm.org/confluence/display/CRMDOC/Debugging

Also clear your drupal session table. Logout/lLogin.

HTH

kurund
Found this reply helpful? Support CiviCRM

mathran

  • Guest
Re: Error on creating a person
May 06, 2008, 07:47:17 am
Kurund,

I would like to make everything work fluid. The users logs in, and in the code I would like to solve all problems for the user.
If the user starts in mygroup.mainste.com then everything works fine. The problem (as I can see) is the switch between both sites.
www.mainstite.com to mygroup.mainsite.com. Somewhere civi holds something in the session.
Is there any php code , some function that I can call to full reinitialize civicrm ?

Thanks a lot,
Martin

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Error on creating a person

This forum was archived on 2017-11-26.