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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Export / Import Custom Data Definitions
Pages: [1]

Author Topic: Export / Import Custom Data Definitions  (Read 3156 times)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Export / Import Custom Data Definitions
July 14, 2009, 10:58:59 am
The Drupal CCK module provides a nice feature whereby one can export and then import node type definitions, including definitions of custom fields. I, for one, would be an avid user of such a feature if it were in CiviCRM.

I have a use case now where I am upgrading a site from D5/Civi 2.0.4 to D6/2.2.7 (latest) and we will need new custom fields in the new version, so whereas I can make those now to test, I will need to remake them every time we run the upgrade process, as we prepare for the final upgrade to go live.

I would also use this to synchronize live and dev versions of the same site.
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 / Import Custom Data Definitions
July 14, 2009, 03:40:57 pm

check:

http://svn.civicrm.org/civicrm/trunk/bin/migrate/

there are two sets of scripts to import/export your custom and profile group/fields

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

joshuami

  • Guest
Re: Export / Import Custom Data Definitions
July 14, 2009, 11:06:20 pm
How does one go about executing scripts in the bin directory on a Drupal site? Can I navigate directly to the export and import scripts? I don't see a link for these under the Administer CiviCRM page.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Export / Import Custom Data Definitions
July 15, 2009, 02:23:12 am
Thank you, Lobo.

Joshuami,

You need to execute this directly in the browser (or from the command line if you know how to use that). If you are using Drupal, then the URL should be:

YOURSITE.com/sites/all/modules/civicrm/bin/migrate/export.php?name=USERNAME&pass=PASSWORD&key=SITEKEY

For more details about running such scripts, see: http://wiki.civicrm.org/confluence/display/CRMDOC/Command-line+Script+Configuration
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.

joshuami

  • Guest
Re: Export / Import Custom Data Definitions
July 17, 2009, 02:28:15 pm
I was able to get the export.php to run from the browser with no problem. The import.php script failed at first because it doesn't parse the db_prefix on the Drupal tables. I renamed them and the error is gone, but the script doesn't seem to do anything. I don't get a form to upload that lovely export XML.

Any ideas?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Export / Import Custom Data Definitions
July 18, 2009, 02:30:46 pm
Save your XML data as a file and append this:

&file=XMLDATAFILENAME.XML

to the URL and the script should read that file. Put the file in the same directory as the scripts.
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.

joshuami

  • Guest
Re: Export / Import Custom Data Definitions
July 20, 2009, 03:07:22 pm
Thank you. That does the trick.

Cheers,

Josh

majortom

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 0
Re: Export / Import Custom Data Definitions
August 03, 2009, 02:34:24 am
This feature was requested http://forum.civicrm.org/index.php/topic,4581.msg19956.html#msg19956

and was also proposed as a feature here http://issues.civicrm.org/jira/browse/CRM-1795

I agree this would be very nice.

/carmi

druderman

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
  • CiviCRM version: 4.1+
  • CMS version: Drupal 7
  • MySQL version: 5.0.77 and 5.1
  • PHP version: 5.2.13
Re: Export / Import Custom Data Definitions
April 03, 2012, 11:21:11 am
Under CiviCRM 4.1 Drupal, I try this:
http://YOURSITE.com/sites/all/modules/civicrm/bin/migrate/export.php?name=USERNAME&pass=PASSWORD&key=SITEKEY  (where USERNAME is the site admin)

But I get this:
This extension: Participant is not yet handled

Also tried it via the command line
php export.php -umyuser -pmypassword   (where myuser is the site admin)

But I get this:
ERROR: You need to send a valid user name and password to execute this file

Is this still supported?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Export / Import Custom Data Definitions

This forum was archived on 2017-11-26.