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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Doing a table swap as upgrade - Joomla with Civi 3.1.4
Pages: [1] 2

Author Topic: Doing a table swap as upgrade - Joomla with Civi 3.1.4  (Read 1739 times)

rolandrogers

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
Doing a table swap as upgrade - Joomla with Civi 3.1.4
July 05, 2012, 10:10:21 am
Hi all,
I seek a bit of help... I have a Joomla site (1.5.17) that needs to be upgraded along with the install of CiviCRM (3.1.4).  The main part of the data is in the Civi part of the site.  i have tried numerous approaches to get a working upgraded site and none have worked.

jUpdate fails which is hindering the whole process.

Now I want to do a clean install of Joomla (2.5.6) and then do a new install of Civi and would then like to swap out the data tables to be able to then run a Civi updater to get to the latest version.

1. Is this a viable approach?
2. What do I need to do to be able to do the data swap for the civi tables?
3. Is there a better approach I should consider?

I have been working on this for days and desperately need to be up to speed soon.

Thanks for any and all feedback and guidance!

- Roland

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Doing a table swap as upgrade - Joomla with Civi 3.1.4
July 05, 2012, 03:07:12 pm
> 1. Is this a viable approach?

Absolutely.

> 2. What do I need to do to be able to do the data swap for the civi tables?

Nothing. The easiest thing is to completely delete the new CiviCRM database and then recreate it, fresh and empty, and then import your old CiviCRM database dump.

> 3. Is there a better approach I should consider?

If this works, then you're set. I have used this basic method many times--it works. :)
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: Doing a table swap as upgrade - Joomla with Civi 3.1.4
July 05, 2012, 03:19:57 pm

hershel:

u've imports a 3.1.x dump into an empty 4.1.x DB schema and its worked fine?

i'd be astonished if that really works since seems like u'll be missing all the meta-data added between 3.1 -> 4.1

and also all the columns that changed names would give an error

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

rolandrogers

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
Re: Doing a table swap as upgrade - Joomla with Civi 3.1.4
July 05, 2012, 10:24:02 pm
Thanks for the responses - I really appreciate your time.

If I can do my new install of Joomla along with version 3.1.4 of Civi and then do the table swap for the civi database where I bring the old tables to the new installation of the same version of Civi, would I then be able to run the civi updater to get from 3.1.x to 4.1.x?

That would achieve my goal of updating both systems.

What considerations would I take when doing the table swap?

Thanks again!

- Roland

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Doing a table swap as upgrade - Joomla with Civi 3.1.4
July 06, 2012, 07:48:38 am
Quote from: Donald Lobo on July 05, 2012, 03:19:57 pm
u've imports a 3.1.x dump into an empty 4.1.x DB schema and its worked fine?

No, what I have done to handle major upgrades (like D6 - D7 or major Joomla upgrade) is to make a fresh Drupal/Joomla site with the latest CiviCRM, then nix the CiviCRM DB, import the old one (such as 3.x) and then run the upgrader on that CiviCRM DB.

That works. :)
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.

rolandrogers

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
Re: Doing a table swap as upgrade - Joomla with Civi 3.1.4
July 24, 2012, 11:38:38 am
Sadly this is not working for me.  Mainly, I can not simply remove the Civi tables after doing the clean install.  I get a #1217 error relating to: "Cannot delete or update a parent row: a foreign key constraint fails".

In theory it seems so simple but in practice it is taking me hours and hours to go one step forward then two steps back!

To recap:

I did a clean Joomla 2.5.6 install on a new server. Now I need to get the existing Civi 3.1.4 data to the new site, ideally in the latest version of Civi.

What is the best way to accomplish this?

Any and all help greatly appreciated!  Guidance, links, paid services...  all acceptable!

- Roland


Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Doing a table swap as upgrade - Joomla with Civi 3.1.4
July 24, 2012, 01:34:53 pm
Quote from: rolandrogers on July 24, 2012, 11:38:38 am
What is the best way to accomplish this?

What I would suggest, if you are having trouble dropping the CiviCRM tables, would be to export JUST the Joomla tables (structure and data), then REMOVE the database altogether, recreate it and then:

1. Import the Joomla tables
2. Import your old CiviCRM tables
3. Run the upgrade tool
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.

rolandrogers

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
Re: Doing a table swap as upgrade - Joomla with Civi 3.1.4
July 26, 2012, 10:09:22 am
Thanks Hershel.  I am going to give this another try.

In step #3, where do I find out more about the right procedure and files to use for the Civi upgrade tool?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Doing a table swap as upgrade - Joomla with Civi 3.1.4
July 26, 2012, 10:22:15 am
Just visit civicrm/upgrade?reset=1 to upgrade.
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.

rolandrogers

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
Re: Doing a table swap as upgrade - Joomla with Civi 3.1.4
July 26, 2012, 11:21:30 am
It helps to know there is someone I can bounce ideas off of!  I did the three steps you suggest and all seemed to go fine but I keep getting the dreaded: "You do not have permission to execute this url." white screen that is related to the index2.php page.

So I have a clean install of Joomla 2.5.6 running with a clean install of Civi 3.1.4 and my imported Civi 3.1.4 tables.  It is all installed in a sub folder of the root of the domain.  I set the install to accomodate for the change in directory and I confirmed that the civicrm.settings.php and config files reflect the new directory.

Trying to run the update menu script as well as the upgrade script you suggest are not working as a result. 

I feel like I am so close, but yet so far!  Is it a version issue?  Can Civi 3.1.4 run under Joomla 2.5.6?

Ready to jump out a window...  I wonder if there is a simple solution to be able to manage the old data in the new install...

Thanks again for any advice!

rolandrogers

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
Re: Doing a table swap as upgrade - Joomla with Civi 3.1.4
July 26, 2012, 11:26:38 am
UPDATE
When I try to manage events, for example, I go from the dashboard to this page:

https://www.SITE.org/new2/administrator/index2.php?option=com_civicrm&task=civicrm/event/manage&reset=1&

I then get the "permission" error cited above.  But if I simply remove the "2" of index2.php the page loads and shows the proper info!!

https://www.SITE.org/new2/administrator/index.php?option=com_civicrm&task=civicrm/event/manage&reset=1&

Does this help anyone narrow down what I need to do to fix this problem? 

Thanks!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Doing a table swap as upgrade - Joomla with Civi 3.1.4
July 26, 2012, 11:35:01 am
Quote from: rolandrogers on July 26, 2012, 11:21:30 am
I feel like I am so close, but yet so far!  Is it a version issue?  Can Civi 3.1.4 run under Joomla 2.5.6?

I don't think so.

If

https://www.SITE.org/new2/administrator/index.php?option=com_civicrm&task=civicrm/event/manage&reset=1&

works so try

https://www.SITE.org/new2/administrator/index.php?option=com_civicrm&task=civicrm/upgrade?reset=1
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.

rolandrogers

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
Re: Doing a table swap as upgrade - Joomla with Civi 3.1.4
July 26, 2012, 11:49:42 am
Good idea - I tried that too!  It runs but just takes me back to the Civi dashboard and still shows that I am running version 3.1.4 in the footer.

Is that supposed to install the latest version of Civi and update tables, and pages, etc.?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Doing a table swap as upgrade - Joomla with Civi 3.1.4
July 26, 2012, 11:53:25 am
It doesn't install anything. First you must replace your code with later code and then you visit that and it upgrades your database.

But if you visit it with OUT first replacing your code, you should see a page saying that you're already running version X and so there's nothing to upgrade.

Perhaps you need to:

1. Install Joomla and latest CiviCRM
2. Drop all CiviCRM tables
3. Load your old ones
4. Run upgrader

But I think that was my first idea....
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.

rolandrogers

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
Re: Doing a table swap as upgrade - Joomla with Civi 3.1.4
July 30, 2012, 06:58:52 am
I am back! After what seemed like a brief success I am back to square one.  I am following your idea to a T but hit error after error.  Previously I installed the newer Joomla with the older Civi 3.1.4 along with my good data I am trying to save. From there I ran the upgrader which you recently commented on indicating I need to load the newer Civi files then dump the civi tables and load the old civi tables and run the upgrade script.

Now when I do that I get an "Initialization Error" and a bunch of code indicating there is no such field and unknown column 'locale_custom_strings' in 'field list'.

Although I do not know what to do at this point it makes sense to me that there is a discrepancy in tables since I am sure the database structure is different from version 3.1.4 to 4.1.5.

I am not sure how you managed success with this approach since it is eluding me at every attempt.

Thanks for your attention Hershel.  Did you use this method to upgrade from version 3 to version 4? Or is it only for going from one "dot" version to another? (ie 4.1.1 to 4.1.5)

- Roland

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Doing a table swap as upgrade - Joomla with Civi 3.1.4

This forum was archived on 2017-11-26.