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 »
  • Standalone Installations (Moderator: cap10morgan) »
  • Migrate Joomla to Standalone
Pages: [1]

Author Topic: Migrate Joomla to Standalone  (Read 4450 times)

drewaharris

  • Guest
Migrate Joomla to Standalone
September 07, 2008, 07:55:02 pm
I don't need Joomla for my internal-only system.

Is it possible to migrate the data from a Joomla 2.1beta3 version to a Standalone install? I assume the data structure differs only slightly.

Can this Mysql newbie to accomplish the necessary changes? The standard install script died with a database error that referenced the civicrm_acl_cache table.

thanks for your help.

Drew


Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Migrate Joomla to Standalone
September 07, 2008, 11:19:50 pm
Here are the steps i would follow -
1. Install standalone v2.1 (different db and no sample data of course).
2. Take dump of joomla db (only civicrm tables).
3. Import the dump in standalone db.

If your joomla is 2.0 first upgrade to 2.1 and then follow above procedure.

Quote
The standard install script died with a database error that referenced the civicrm_acl_cache table.
 
Could you provide more details on this ? When and how you got this error ?
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

drewaharris

  • Guest
Re: Migrate Joomla to Standalone
September 08, 2008, 06:22:08 am
Thanks for your help. I'll give it a try.

I wrote a message about this error with details in the beta forum.
http://forum.civicrm.org/index.php/topic,4670.0.html

DREW

drewaharris

  • Guest
Re: Migrate Joomla to Standalone
September 08, 2008, 07:04:23 am
I'm getting the same error even when starting with a empty database.

Standalone won't install unless I create a database and tag a user to it first. [I guess this is a Bluehost issue.] When I install after creating a blank database. I get the same error message.

Code: [Select]
backTrace

/home2/njabrcom/public_html/civicrm/CRM/Core/Error.php, backtrace, 138
, handle,
/home2/njabrcom/public_html/civicrm/packages/PEAR.php, call_user_func, 912
/home2/njabrcom/public_html/civicrm/packages/DB.php, PEAR_Error, 966
/home2/njabrcom/public_html/civicrm/packages/PEAR.php, DB_Error, 574
/home2/njabrcom/public_html/civicrm/packages/DB/common.php, raiseError, 1903
/home2/njabrcom/public_html/civicrm/packages/DB/mysql.php, raiseError, 898
/home2/njabrcom/public_html/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
/home2/njabrcom/public_html/civicrm/packages/DB/common.php, simpleQuery, 1216
/home2/njabrcom/public_html/civicrm/packages/DB/DataObject.php, query, 2394
/home2/njabrcom/public_html/civicrm/packages/DB/DataObject.php, _query, 1039
/home2/njabrcom/public_html/civicrm/CRM/Core/DAO.php, insert, 279
/home2/njabrcom/public_html/civicrm/CRM/ACL/BAO/Cache.php, save, 93
/home2/njabrcom/public_html/civicrm/CRM/ACL/BAO/Cache.php, store, 63
/home2/njabrcom/public_html/civicrm/CRM/ACL/BAO/ACL.php, build, 645
/home2/njabrcom/public_html/civicrm/CRM/ACL/API.php, check, 69
/home2/njabrcom/public_html/civicrm/CRM/Core/Permission/Standalone.php, check, 95
/home2/njabrcom/public_html/civicrm/CRM/Core/Permission.php(82) : eval()'d code, check, 1
/home2/njabrcom/public_html/civicrm/CRM/Core/Permission.php, eval, 82
/home2/njabrcom/public_html/civicrm/CRM/Core/Block.php, check, 489
/home2/njabrcom/public_html/civicrm/CRM/Core/Standalone.php, getContent, 59
/home2/njabrcom/public_html/civicrm/CRM/Core/Invoke.php, sidebarLeft, 86
/home2/njabrcom/public_html/civicrm/standalone/index.php, invoke, 40
/home2/njabrcom/public_html/civicrm/standalone/index.php, invoke, 66

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    DB Error: constraint violation

    Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`njabrcom_civicrm/civicrm_acl_cache`, CONSTRAINT `FK_civicrm_acl_cache_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE), 1452

    Return to home page.

Error 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 (`njabrcom_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 (`njabrcom_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 (`njabrcom_civicrm/civicrm_acl_cache`, CONSTRAINT `FK_civicrm_acl_cache_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]"]
)
[/code]

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Migrate Joomla to Standalone
September 08, 2008, 07:23:08 am
yes you need a new db and a permissioned user.

However what i don't understand is how you encountered to this error. The standalone installer shouldn't allow you to proceed if you don't have a db and a permissioned user. Is this after/during install error ?  What was the url you accessed ?
« Last Edit: September 08, 2008, 07:24:50 am by Deepak Srivastava »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

drewaharris

  • Guest
Re: Migrate Joomla to Standalone
September 08, 2008, 08:24:02 am
Sorry if I wasn't clear. I encountered this error after creating a blank database and permissioning a user. I'm using this url:
.../civicrm/standalone/

Directory permissions are set to 755.

drewaharris

  • Guest
Re: Migrate Joomla to Standalone
September 08, 2008, 12:55:36 pm
Update:

I changed the permissions to 777 and got standalone to install in a blank database. Unfortunately when I try to import the data from the Joomla 2.1 export, it dies with this error message.

Documentation
#1452 - Cannot add or update a child row: a foreign key constraint fails (`njabrcom_civicrm/civicrm_activity`, CONSTRAINT `FK_civicrm_activity_source_contact_id` FOREIGN KEY (`source_contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)

I'm guess that I need to do some manual manipulation of the tables. Or, is it even possible?

Or, beyond my present skillset.


Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Migrate Joomla to Standalone
September 08, 2008, 09:00:57 pm
If you using phpMyAdmin, while taking dump you can enable the option "Disable foreign key checks".

OR manually add "SET FOREIGN_KEY_CHECK = 0 ;" at the beginning of the dump-file and "SET FOREIGN_KEY_CHECK = 1 ;" at the end of file.

And then go for import.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

drewaharris

  • Guest
Re: Migrate Joomla to Standalone
September 10, 2008, 07:07:43 am
That work ... for awhile.

I tried reinstalling to get the right tables imported, but now a clean install fails with this error even if I create a brand new database. I assume that there a Mysql permission is not right or locked up.  Thoughts??

Code: [Select]
backTrace

/home2/XXXX/public_html/civicrm/CRM/Core/Error.php, backtrace, 138
, handle,
/home2/XXXX/public_html/civicrm/packages/PEAR.php, call_user_func, 912
/home2/XXXX/public_html/civicrm/packages/DB.php, PEAR_Error, 966
/home2/XXXX/public_html/civicrm/packages/PEAR.php, DB_Error, 574
/home2/XXXX/public_html/civicrm/packages/DB/common.php, raiseError, 1903
/home2/XXXX/public_html/civicrm/packages/DB/mysql.php, raiseError, 898
/home2/XXXX/public_html/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
/home2/XXXX/public_html/civicrm/packages/DB/common.php, simpleQuery, 1216
/home2/XXXX/public_html/civicrm/packages/DB/DataObject.php, query, 2394
/home2/XXXX/public_html/civicrm/packages/DB/DataObject.php, _query, 1039
/home2/XXXX/public_html/civicrm/CRM/Core/DAO.php, insert, 279
/home2/XXXX/public_html/civicrm/CRM/ACL/BAO/Cache.php, save, 93
/home2/XXXX/public_html/civicrm/CRM/ACL/BAO/Cache.php, store, 63
/home2/XXXX/public_html/civicrm/CRM/ACL/BAO/ACL.php, build, 645
/home2/XXXX/public_html/civicrm/CRM/ACL/API.php, check, 69
/home2/XXXX/public_html/civicrm/CRM/Core/Permission/Standalone.php, check, 95
/home2/XXXX/public_html/civicrm/CRM/Core/Permission.php(82) : eval()'d code, check, 1
/home2/XXXX/public_html/civicrm/CRM/Core/Permission.php, eval, 82
/home2/XXXX/public_html/civicrm/CRM/Core/Block.php, check, 489
/home2/XXXX/public_html/civicrm/CRM/Core/Standalone.php, getContent, 59
/home2/XXXX/public_html/civicrm/CRM/Core/Invoke.php, sidebarLeft, 86
/home2/XXXX/public_html/civicrm/standalone/index.php, invoke, 40
/home2/XXXX/public_html/civicrm/standalone/index.php, invoke, 66

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    DB Error: constraint violation

    Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`XXXX_civicrm/civicrm_acl_cache`, CONSTRAINT `FK_civicrm_acl_cache_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE), 1452

    Return to home page.

Error 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 (`XXXX_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 (`XXXX_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 (`XXXX_civicrm/civicrm_acl_cache`, CONSTRAINT `FK_civicrm_acl_cache_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]"]
)
[/code]

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Migrate Joomla to Standalone
September 10, 2008, 07:52:21 am
1. You sure you following the instructions given here - http://wiki.civicrm.org/confluence/display/CRMDOC/Install+2.1+Standalone, for v2.1 Standalone installation ?

2. If you not clear with how to create a permissioned user for a db, this doc might help - http://dev.mysql.com/doc/refman/5.0/en/grant.html
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Standalone Installations (Moderator: cap10morgan) »
  • Migrate Joomla to Standalone

This forum was archived on 2017-11-26.