0

I am rebuilding a Joomla website with a corrupt database. I would like to recreate the CiviCRM structures in the new website. That would include membership types, price sets and contribution pages.

1 Answer 1

1

There are a few approaches, none perfect. It would be great to be able to export config of entities and load that into another site / instance.

  1. It's possible to write code to generate the various entities using the CiviCRM API. This can work, but probably has higher up-front time costs than option 4 below. It's what I'd most likely do if I wanted to be able to test the deployment of changes and had a medium-scale budget.

  2. CiviCRM offers a hook (hook_civicrm_managed()) which you could use to configure your site with the various entities mentioned. This has some challenges, eg it "locks" the managed entities to the extension in question - disabling that extension in future might then remove the managed membership type, potentially affecting recorded memberships and so forth. (I'm not sure whether editing managed entities is permitted, either?)

  3. It's possible to export the SQL entries which relate to the specific values you want, but you'd need to match up the IDs for the entities (memberships, contribution pages, price sets and options etc) on loading. Kinda ugly.

  4. You can click your way through the config. I'd guess you're asking this because you think there should be a more reliable way to deploy configuration ... as of today, I don't think there is. This is your low budget option.

One important factor is that these entities may need to be created in a specific order to handle dependency, since the priceset / options may relate to the membership type, and that membership type may relate to an organisation contact, and ...

This is a question which has been asked before, but IMO hasn't as yet been solved well. These previous SE questions might offer some insight?

4
  • github.com/xurizaemon/civicrm-configexport is some work we did a few years back to explore configuration export / import. I don't recommend it as a complete solution, just linking it here in case it gives you or someone else a starting point. This might be the starting point for a "we have heaps of budget" option 😀 Commented Mar 5, 2017 at 3:36
  • It looks like #4 will be the way I will go. I caught the database problem before getting a lot of membership signups but recreating the membership types and contribution pages will be a PITA! I was able to transfer the Joomla parts of the site using a nice little utility named J2XML which exports/imports almost everything in Joomla to/from XML files. All that needs to be done manually is the Joomla menus and the CiviCRM stuff. Maybe the way J2XML does it could work? Commented Mar 6, 2017 at 4:10
  • 🙂 if you like, the github repo linked above your comment is pretty much an example of C2YML (vs J2XML). On the project we built it for, we discovered that the dependency issues mean you'd need to map out all the potential dependency trees of Civi entities in order to reliably export any Civi entity. It works - but there's legwork to do to make it do a complete job, and for now it depends on the user knowing a lot about Civi's internals in order for the tool to function effectively. Commented Mar 6, 2017 at 8:41
  • Thanks. Probably easier just to build what I need from scratch. Commented Mar 7, 2017 at 1:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.