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 Import (Moderator: Yashodha Chaku) »
  • Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
Pages: [1] 2

Author Topic: Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM  (Read 5626 times)

Gerhard

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 0
  • Anyone who has hope is happy…
    • Drupal Agentur
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.60
  • PHP version: 5.2
Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
October 17, 2012, 07:33:15 am
Dear "CiviCRM specialists",

I need to export all of my Joomla CiviCRM 3.4.8. users with their referring memberships, custom fields AND their login name and password.
Then I need to import this csv file into my Drupal 7 CiviCRM 4.2.2 installation.

The needed result is that our users can login with their existing "Joomla /CiviCRM" login credentials (username & password) in our new Drupal 7 / CiviCRM 4.2.2 site.

Is there a standard procedure for this?

I am aware of how to export users in CiviCRM but not sure if and how the username/password issue must be correctly handled for working with Drupal's standard user authentication later on.

Thx for any info or where I might find suitable documentation on this (I read through the manuals but no luck here)
Gerhard

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
October 17, 2012, 10:13:04 am
Hi. There are two issues here. One is to export/import the CiviCRM Contacts and the second is to export Joomla Users and convert them into Drupal ones and import them into Drupal. Users and Contacts are two separate concepts. CiviCRM maps Users to Contacts, but not always.

Anyhow for the CiviCRM aspect, your database is essentially portable as is and can be used with Drupal. See here for more details http://wiki.civicrm.org/confluence/display/CRMDOC42/Migrating+from+Joomla+to+Drupal

To convert your Joomla Users to Drupal see here http://drupal.org/project/joomla

You would have to run the synchronize tool in CiviCRM afterwards to sync Users and Contacts.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Gerhard

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 0
  • Anyone who has hope is happy…
    • Drupal Agentur
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.60
  • PHP version: 5.2
Re: Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
October 19, 2012, 01:51:15 am
Dear Hershel,

thx a lot for your prompt and helpful reply. I am already following the steps of the docs you've recommended.

Before deleting anything I am wondering if this in my case is also the right way to use my old Joomla users ("Migrating from Joomla to Drupal") mapped to contacts in Civi:

"Empty the civicrm_uf_match table

This table is used for mapping your CMS users with CiviCRM contacts. At this stage those mappings will be according to users from your Joomla site. You will need to delete these mappings so that Drupal can then automatically rebuild them from the new users table."

Does that mean I delete these mappings from Joomla/Civi -> import the old Joomla users with the Joomla to Drupal Module and sync Users and Contacts with the Civi
"Synchronize Users to Contacts" tool?

But what happens to our different Membership associations , our custom fields the contacts have filled out etc.? Are these lost then?

Thx a again for the helpful support.

Viele Gruesse from Germany - Gerhard

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
October 19, 2012, 03:26:05 am
Quote from: Gerhard on October 19, 2012, 01:51:15 am
Does that mean I delete these mappings from Joomla/Civi -> import the old Joomla users with the Joomla to Drupal Module and sync Users and Contacts with the Civi
"Synchronize Users to Contacts" tool?

Yes, exactly.

Quote from: Gerhard on October 19, 2012, 01:51:15 am
But what happens to our different Membership associations , our custom fields the contacts have filled out etc.? Are these lost then?

Nothing will be lost. That's all stored in CiviCRM and associated only with the Contact record, not the User.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Gerhard

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 0
  • Anyone who has hope is happy…
    • Drupal Agentur
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.60
  • PHP version: 5.2
Re: Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
October 19, 2012, 04:08:12 am
Great, thx again. Just struggling with the version Civi 3.4.8 coming from the old Joomla site which is Drupal 6 only, changing MyISAM to InnoDB, then upgrading the 3.4.8 to 4.2.4, using Drupal 7 and then the user import...
But with your help/info above I am optmistic to get it done somehow... :-)

Thx and viele Gruesse
Gerhard

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
October 19, 2012, 04:11:11 am
Es freut mich, dass ich Ihnen helfen konnte :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Gerhard

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 0
  • Anyone who has hope is happy…
    • Drupal Agentur
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.60
  • PHP version: 5.2
Re: Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
October 19, 2012, 05:44:51 am
 :)

Gerhard

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 0
  • Anyone who has hope is happy…
    • Drupal Agentur
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.60
  • PHP version: 5.2
Re: Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
October 21, 2012, 05:58:29 am
Hi there,

it's sunday and I am stuck with my CiviCRM for Joomla 3.4.8 update to CiviCRM 4.2.4 for Drupal 7:

1) I've made all the changes to the 3.4.8 database for Joomla (http://wiki.civicrm.org/confluence/display/CRMDOC42/Migrating+from+Joomla+to+Drupal)

2) connected this new db to my Drupal 6 testdrive (civicrm.settings.php) and dumped it to import it on my live server with D7 running

3) I installed a fresh civicrm 4.2.4 there, connected this now to the dump from 3.4.8 and run the upgrade script (/civicrm/upgrade?reset=1).

4) I received the following error:
"Sorry but we are not able to provide this at the moment.
The upgrade has identified some schema integrity issues in the database. It seems some of your constraints are missing. You will have to rebuild your schema before re-trying the upgrade. Please refer Ensuring Schema Integrity on Upgrades"

 I then have followed all the steps documented here: http://wiki.civicrm.org/confluence/display/CRMDOC42/Ensuring+Schema+Integrity+on+Upgrades

5) I followed the steps there but at step 7 I have no clue what is meant there:

"Procedure for 1.8 -> 1.9 upgrade"

what versions are these upgrade scripts are corresponding to?

("Load and run the SQL upgrade script corresponding to the version you are upgrading") ?

(ignoring these steps didn't help, still no chance to run the upgrade script succesfully with 4.2.4 running :-(

can you pls. advice if and then what upgrade script is the correct one when trying to upgrade from 3.4.8 to 4.2.4?
where does these version numbers are coming from anyway (ancient times when it was civicrm 1.x?)? Confusing!

But maybe the step  to upgrade from 3.4.8 to 4.2.4 is too big anyway? (Puh!)

Thx and have a great day -Gerhard
« Last Edit: October 21, 2012, 06:20:11 am by Gerhard »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
October 21, 2012, 09:50:46 am
Quote from: Gerhard on October 21, 2012, 05:58:29 am
5) I followed the steps there but at step 7 I have no clue what is meant there:


You are done. You don't need to proceed past where it says "Now the new database is ready for upgrade to next higher version." Just try the upgrade again there. If it fails, then post for us exactly what steps you are taking to fix the schema.

Quote from: Gerhard on October 21, 2012, 05:58:29 am
where does these version numbers are coming from anyway (ancient times when it was civicrm 1.x?)? Confusing!

Yes, CiviCRM was 1.x in ancient times. There are even a few elders still left on the team who remember those days. ;)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

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: Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
October 21, 2012, 12:55:58 pm
Quote from: Hershel on October 21, 2012, 09:50:46 am
Yes, CiviCRM was 1.x in ancient times. There are even a few elders still left on the team who remember those days. ;)

actually there are a LOT of elders still around who remember the good ole days (but luckily not the bad ole code)

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

Gerhard

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 0
  • Anyone who has hope is happy…
    • Drupal Agentur
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.60
  • PHP version: 5.2
Re: Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
October 22, 2012, 04:26:53 am
@lobo: :-)

Dear Hershel,

thx for the reply & help.  Since I still didn't succeed here is a short wrap-up of what I have tried so far (only the last attempt of my 5 complete "run-throughs"):

1) I edited the sql file of the joomla and civicrm 3.4.8 in an editor, deleted all the joomla tables, changed all the civi Tables from MyIsam to InnoDB, deactivated forreign keys (SET foreign_key_checks = 0;) and added to the last line this again (SET foreign_key_checks = 1;).

2) Imported this file via SSH (mysql command) in an empty mysql db and changed everything according to the documentation (Joomla to Drupal) with my Drupal 6 domain for this purpose:
TRUNCATE TABLE `<civicrm_database>`.`civicrm_uf_match`;
Update the Directory Path and URL
Update the Resource URLs
TRUNCATE TABLE `<civicrm_database>`.`civicrm_menu`;
UPDATE `<civicrm_database>`.`civicrm_domain` SET `config_backend` = NULL
WHERE `civicrm_domain`.`id` = 1 LIMIT 1;

after this last step, the CiviCRM Menu shows up in Drupal but also "1 meter civi error messages" ("warning: array_key_exists() [function.array-key-exists]: .../civicrm/CRM/Core/BAO/Setting.php on line 175").

I managed to succeed here with pasting the drupal 4.2.4 ingredients from the clean Drupal 7 install and civicrm 4.2.4 into the field `civicrm_domain` `config_backend' (instead of NULL, which always lead to the horrible 100+ error messages, deleting the templates_c folder/en-US didn't help neither before...! (I read through nearly all of these issues before :-)

Now I can use civiCRM 3.4.8 on my Drupal 6 test site and can search for contacts etc..
I dumped this "working" mysql (SSH) again.

3) D7 / CiviCRM 4.2.4
I imported this dump in an empty new mysql on my live server, connected this 3.4.8 civicrm mysql db to my Drupal 7 CiviCRM 4.2.4 (via editing civicrm.settings.php)

Then I tried to run the upgrade script (http://<your_drupal_home>/civicrm/upgrade?reset=1) - but without success:

"Sorry but we are not able to provide this at the moment.
The upgrade has identified some schema integrity issues in the database. It seems some of your constraints are missing. You will have to rebuild your schema before re-trying the upgrade. Please refer Ensuring Schema Integrity on Upgrades"

Then I followed all the steps from here: http://wiki.civicrm.org/confluence/display/CRMDOC42/Ensuring+Schema+Integrity+on+Upgrades
with a clean mysql (not the one which I attempted to upgrade in the step before (Itook again the initial dump that came from step 2 (D6, civicrm 3.4.8).

I used the 4.2.4 sql scheme only from .../sites/all/modules/civicrm/sql/civicrm.mysql (without data, imported one custom field table structure only from 3.4.8, imported the dump (with data) again (SSH) in this 4.2.4 structure only db and connected this to my Drupal 7 / CiviCRM 4.2.4.
It shows civiCRM 4.2.4 environment, civi menu, etc.  but when I try to search e.g. for a contact (or a member) I get the following error:

"Sorry but we are not able to provide this at the moment.
DB Error: no such field

Return to home page."

When I try to upgrade this db I still get the same error as before (see above):

""Sorry but we are not able to provide this at the moment.
The upgrade has identified some schema integrity issues in the database. It seems some of your constraints are missing. You will have to rebuild your schema before re-trying the upgrade. Please refer Ensuring Schema Integrity on Upgrades"

So I assume I have done a very decent job but unfortunately without a working civiCRM on my Drupal 7 / CiviCRM Live Server :-(

Thx again and viele Gruesse aus dem super sonnigen Köln (schwitz!) -Gerhard

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
October 22, 2012, 04:31:47 am
It sounds like you tried to use a good 4.2.4 schema with your 3.4.8 data. That's not what you need. You need to

1. Dump data only from your 3.4.8 DB
2. Create a schema-only of 3.4.8 that's correct. Either import the SQL files or do a fresh install and then dump structure-only
3. Import your data from step 1 into the DB
4. Run the upgrade to 4.2.4

Lassen Sie uns wissen, wie es geht. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Gerhard

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 0
  • Anyone who has hope is happy…
    • Drupal Agentur
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.60
  • PHP version: 5.2
Re: Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
October 22, 2012, 08:31:30 am
Hallo,

one day later (and following your steps 1. - 4.) still no change:

"Sorry but we are not able to provide this at the moment.
The upgrade has identified some schema integrity issues in the database. It seems some of your constraints are missing. You will have to rebuild your schema before re-trying the upgrade. Please refer Ensuring Schema Integrity on Upgrades

Return to home page."

I used the clean scheme from 3.4.8 this time in a fresh new mysql and imported the working dump data from D6 / CiviCRM 3.4.8 in it (changed from MyISAM to InnoDB this time with VI (Shell) which helped me to keep the correct UTF-8 encoding (every Windows Editor destroys this and so German Umlaute are destroyed as well ...)

So I guess this upgrade is just not ppossible?

What if I manually import all the Users into the empty 4.2.4? How do I keep all activities or at least memeberships and custom fields existing in the 3.4.8 civiCRM mysql.

Thx -G

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
October 22, 2012, 09:13:26 am
Quote from: Gerhard on October 22, 2012, 08:31:30 am
I used the clean scheme from 3.4.8 this time in a fresh new mysql and imported the working dump data from D6 / CiviCRM 3.4.8 in it (changed from MyISAM to InnoDB this time with VI (Shell) which helped me to keep the correct UTF-8 encoding 

I don't follow you. If it's a data-ONLY dump then there are no tables, so MyISAM and InnoDB should be in that dump.

Quote from: Gerhard on October 22, 2012, 08:31:30 am
(every Windows Editor destroys this and so German Umlaute are destroyed as well ...)

Try Linux. ;)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Gerhard

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 0
  • Anyone who has hope is happy…
    • Drupal Agentur
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.60
  • PHP version: 5.2
Re: Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM
October 22, 2012, 09:33:13 am
Quote
I don't follow you. If it's a data-ONLY dump then there are no tables, so MyISAM and InnoDB should be in that dump.

I use the "mysqldump" command to dump the working mysql (I only know that with a -d command inserted the result is a structure only dump with no output data exported)
Is there a command to only dump the data without tables?

The documentation "Ensuring Schema Integrity on Upgrades" suggests to

mysqldump -u username -p -c -e -n -t databasename > datafile.sql

I don't what the -c -n -t stands for.  Maybe this is the solution?

:-)

(Puh)
Thx -G

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Export all CiviCRM Joomla members with passwords & import in Drupal CiviCRM

This forum was archived on 2017-11-26.