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 »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Complete removal and reinstall of CiviCRM on Drupal
Pages: [1]

Author Topic: Complete removal and reinstall of CiviCRM on Drupal  (Read 2233 times)

leupi

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 2
Complete removal and reinstall of CiviCRM on Drupal
September 21, 2010, 10:48:10 am
I have a Drupal installation with CiviCRM installed. I was trying to import an existing database from another CiviCRM installation and did something wrong and I can't seem to get things back again.

I would like to completely uninstall and reinstall the Civi installation but it's not working. Every time I try to do so, when I try to access the add a new individual (just to test and see if I installed correctly) I get the following error:
Code: [Select]
Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`civicrm`.`civicrm_acl_cache`, CONSTRAINT `FK_civicrm_acl_cache_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE), 1452
Additional Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -3
    [message] => DB Error: constraint violation
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_acl_cache (contact_id , acl_id ) VALUES ( 1 ,  2 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`civicrm`.`civicrm_acl_cache`, CONSTRAINT `FK_civicrm_acl_cache_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_acl_cache (contact_id , acl_id ) VALUES ( 1 ,  2 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`civicrm`.`civicrm_acl_cache`, CONSTRAINT `FK_civicrm_acl_cache_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
    [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_acl_cache (contact_id , acl_id ) VALUES ( 1 ,  2 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`civicrm`.`civicrm_acl_cache`, CONSTRAINT `FK_civicrm_acl_cache_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]"]
)

I have removed the Civi module, used phpmyadmin to remove the database, deleted the civicrm.settings.php file, and also deleted the civicrm folder. I would then try and install fresh but keep getting the same error. What can I do besides reinstalling Drupal?

My end goal is to install Drupal/CiviCRM on a server that I just built and then import the CiviCRM database. I do not want to import the Drupal database, there is nothing in there that I want to keep, there is only usable info in the CiviCRM database.

Thanks[/code]

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: Complete removal and reinstall of CiviCRM on Drupal
September 21, 2010, 11:30:26 am

can u truncate the drupal sessions table. there is old information stashed there which messes a new install bug (IMO this is a civi bug but i cannot figure out a nice clean easy solution)

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

leupi

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 2
Re: Complete removal and reinstall of CiviCRM on Drupal
September 21, 2010, 11:48:38 am
Thanks for the response. I am not much of a database person. I found the 'sessions' table in phpmyadmin. Can you tell me what I need to do to truncate it? If I can reading things correctly, it only has one record in it. Would I simply empty it?

Thanks again.

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: Complete removal and reinstall of CiviCRM on Drupal
September 21, 2010, 11:54:58 am

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

leupi

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 2
Re: Complete removal and reinstall of CiviCRM on Drupal
September 22, 2010, 06:17:49 am
That did the trick.

Thanks

westy

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 1
  • CiviCRM version: CiviCRM 4.5.0
  • CMS version: Drupal 7.31
  • MySQL version: 5.5.38
  • PHP version: Ubuntu Linux 12.04.3
Re: Complete removal and reinstall of CiviCRM on Drupal
October 05, 2010, 09:50:14 am
Had the same problem after installing 3.2
In my case I couldn't even set up the domain information
Truncating that drupal sessions table worked for me too.
Thanks a lot

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Complete removal and reinstall of CiviCRM on Drupal
October 05, 2010, 06:37:03 pm
that worked for me too!  Also you must delete the files/civicrm folder when you reinstall.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Complete removal and reinstall of CiviCRM on Drupal

This forum was archived on 2017-11-26.