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) »
  • Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
Pages: [1] 2

Author Topic: Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6  (Read 3619 times)

sfeher

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: WordPress 3.9.1
  • MySQL version: 5.5
  • PHP version: 5.4
Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
July 09, 2014, 01:54:13 pm
First of all -- New to CiviCRM
Have managed to successfully migrate Civi 4.2.1 from Drupal to a new server running WordPress 3.9.1. 
Now experiencing some strange issues with integration of users' table in WP with Civi and the Dashboard is not displaying content because it keeps claiming that I have javascript disabled.     The site isn't live yet, so I figure now is as good a time as any to update Civi to the latest/greatest. 

Gone through the upgrade steps here:  http://wiki.civicrm.org/confluence/display/CRMDOC/Upgrade+WordPress+Sites+to+4.5.

First issue is an error on data integrity, where a a couple of contributions apparently don't have a contact ID associated.  The install script recommends the following query to isolate and delete these contributions:
Code: [Select]
SELECT ct.* FROM civicrm_contribution ct LEFT JOIN civicrm_contact c ON ct.contact_id = c.id WHERE c.id IS NULL;

I run the query, and delete the offending contributions, and move forward in the update script.   I confirm the preparation to update and the process ensues.
[Executed: Upgrade DB to 4.2.3]
Code: [Select]
ype DB_Error
Code -1
Message DB Error: unknown error
Mode 16
UserInfo ALTER TABLE civicrm_discount DROP FOREIGN KEY FK_civicrm_discount_option_group_id [nativecode=1025 ** Error on rename of './stjocl14_civiCRM/civicrm_discount' to './stjocl14_civiCRM/#sql2-26c4-23f59b' (errno: 152)]
DebugInfo ALTER TABLE civicrm_discount DROP FOREIGN KEY FK_civicrm_discount_option_group_id [nativecode=1025 ** Error on rename of './stjocl14_civiCRM/civicrm_discount' to './stjocl14_civiCRM/#sql2-26c4-23f59b' (errno: 152)]
PEAR_Exception: DB Error: unknown error in unknown on line unknown
- DB_Error: DB Error: unknown error in unknown on line unknown
Exception trace
# Function Location
0 CRM_Core_Error::exceptionHandler(Object(DB_Error)) unknown:unknown
1 call_user_func(Array, Object(DB_Error)) /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:931
2 PEAR_Error->PEAR_Error('DB Error: unknow…', -1, 16, Array, 'ALTER TABLE civi…') /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php:969
3 DB_Error->DB_Error(-1, 16, Array, 'ALTER TABLE civi…') /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:564
4 PEAR->raiseError(null, -1, null, null, 'ALTER TABLE civi…', 'DB_Error', true) /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php:1905
5 DB_common->raiseError(-1, null, null, null, '1025 ** Error on…') /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php:898
6 DB_mysql->mysqlRaiseError() /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php:327
7 DB_mysql->simpleQuery('ALTER TABLE civi…') /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php:1216
8 DB_common->query('ALTER TABLE civi…') /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/File.php:284
9 CRM_Utils_File::sourceSQLFile('mysql://stjocl14…', '-- CRM-10969 SEL…', null, true) /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Form.php:160
10 CRM_Upgrade_Form->source('-- CRM-10969 SEL…', true) /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Form.php:300
11 CRM_Upgrade_Form->processLocales('/home/stjocl14/p…', '4.2.3') /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Form.php:324
12 CRM_Upgrade_Form->processSQL('4.2.3') /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/php/FourTwo.php:413
13 CRM_Upgrade_Incremental_php_FourTwo::task_4_2_x_runSql(Object(CRM_Queue_TaskContext), '4.2.3') unknown:unknown
14 call_user_func_array(Array, Array) /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Task.php:79
15 CRM_Queue_Task->run(Object(CRM_Queue_TaskContext)) /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Runner.php:186
16 CRM_Queue_Runner->runNext(true) /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php:44
17 CRM_Queue_Page_AJAX::{closure}() /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/ErrorPolicy.php:80
18 CRM_Queue_ErrorPolicy->call(Object(Closure)) /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php:47
19 CRM_Queue_Page_AJAX::runNext(Array) unknown:unknown
20 call_user_func(Array, Array) /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:289
21 CRM_Core_Invoke::runItem(Array) /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:72
22 CRM_Core_Invoke::_invoke(Array) /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:52
23 CRM_Core_Invoke::invoke(Array) /home/stjocl14/public_html/wp-content/plugins/civicrm/civicrm.php:495
24 CiviCRM_For_WordPress->invoke('') unknown:unknown
25 call_user_func_array(Array, Array) /home/stjocl14/public_html/wp-includes/plugin.php:470
26 do_action('toplevel_page_Ci…') /home/stjocl14/public_html/wp-admin/admin.php:211
27 {main}



Clearly there's some error in trying to change the table civicrm_discount

Code: [Select]
ALTER TABLE civicrm_discount DROP FOREIGN KEY FK_civicrm_discount_option_group_id [nativecode=1025 ** Error on rename of './stjocl14_civiCRM/civicrm_discount' to './stjocl14_civiCRM/#sql2-26c4-23f59b' (errno: 152)]


I can't seem to locate any other issues or details here in the forum of people having this same error....

Not sure what the next proper step is..... 

Any help or recommendations is appreciated.

Thanks!

sfeher

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: WordPress 3.9.1
  • MySQL version: 5.5
  • PHP version: 5.4
Re: Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
July 10, 2014, 11:40:44 am
Looking for some advice on this:

Several posts recommend that their success in upgrading CiviCRM was due to making iterations of their update.  In other words -- the jump from 4.2.1 to 4.4.6 might be too far to take at once..... and I should try making smaller updates first. 

When you review the upgrade instructions on the CiviCRM support area, this is not the recommended course of action, of course....so I'm curious if anyone has an upgrade path that they'd recommend from 4.2.1 to 4.4.6 that I should try.

Thanks!
Steve

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
July 10, 2014, 12:57:43 pm
This is the "alternative" plan. Yes, definitely try it in increments. I can't say precisely what is the first step, but try 4.3 perhaps. Just try something and see if it works, and then you've got the first step down. :)
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.

RachelWright

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 3
  • CiviCRM version: 4.2.7
  • CMS version: Joomla 2.5.17
  • MySQL version: 5.5.37
  • PHP version: 5.4.26
Re: Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
July 11, 2014, 11:50:22 am
I was running civi 4.2.7 in Joomla and having trouble upgrading, so I migrated to WP. I found the upgrades went smoothly from 4.2.7 to 4.3.5, then to 4.4.5, then 4.4.6. (You might be able to skip 4.4.5, at the time I was working on this 4.4.6 wasn't out yet.)

sfeher

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: WordPress 3.9.1
  • MySQL version: 5.5
  • PHP version: 5.4
Re: Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
July 11, 2014, 12:09:16 pm
Thank you all for the recommendations.
I'll need to try those incremental updates and I'll post back on the progress.

Enjoy the weekend!


JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Re: Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
July 12, 2014, 06:11:23 am
My advice is when doing increments, go to the latest 4.3, not 4.3.1

How many custom code/template files do you have? Any custom extensions or modules?
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

sfeher

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: WordPress 3.9.1
  • MySQL version: 5.5
  • PHP version: 5.4
Re: Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
July 14, 2014, 06:50:28 am
JohnFF --
I'm not really sure how much customization has been performed on various templates and files.  I've inherited this site, and there's not a lot of detail in terms of previous customizations.

Is there an easy way to tell what customizations may have been done?

Thanks!

sfeher

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: WordPress 3.9.1
  • MySQL version: 5.5
  • PHP version: 5.4
Re: Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
July 14, 2014, 10:29:46 am
OK --
Hitting my head up against a wall here.

My goal is to upgrade my installation of Civi from 4.2.1 to 4.4.6.   making the initial jump(attempted to run a single upgrade routine)  failed -- see the post that starts this thread. 

I've tried the advice of upgrading along "smaller steps" and tried the following:

Attempted to upgrade from 4.2.1 to 4.3.5
Working copy of 4.2.1
Made backups of everything.
Downloaded and installed version 4.3.5
Attempt upload script and the whole things halts during a DB update for version 4.2.3  (Note - this was the same error as was originally reported above.
Reset from backups and restore to working 4.2.1 files and DB.

Attempt upgrade from 4.2.1 to 4.2.2
Working copy of 4.2.1
Backups of everything
Download and install 4.2.2
Attempt upload script and it works!   Successful upgrade from 4.2.1 to 4.2.2

Attempt upgrade from 4.2.2 to 4.2.3
Working copy of 4.2.2
backups of everything
Download and install --- BUT THERE IS NO 4.2.3 version of the software available??   

Attempt upgrade from 4.2.2 to 4.2.4
Working copy of 4.2.2
backups of everything
Download and install version 4.2.4
Run the upload script and the same failure as mentioned in the initial post happens again -- failure at the DB upgrade for 4.2.3.

Several questions:
1.) Why is there no version 4.2.3 available for the upgrade path?   4.2.1, 4.2.2, _____, 4.2.4.    What happened to that version of the update path?
2.) IF there IS no update path for 4.2.3, then why does the database attempt to perform what's listed as a 4.2.3 DB update?   
3.) Was there an error with the 4.2.3 update that was never changed for the 4.2.4 update scripting??   


Seriously -- this is starting to become a serious problem.   I don't understand how this error keeps happening -- there has to be someone who knows why I keep getting that error!

Thanks for any help you can offer!

Steve   

andrewhunt

  • I post occasionally
  • **
  • Posts: 80
  • Karma: 13
    • AGH Strategies
  • CiviCRM version: all of 'em
  • CMS version: Drupal, Joomla, and WordPress
Re: Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
July 17, 2014, 08:26:29 am
I remember that 4.2.3 was pulled, but I didn't remember why.  I found the blog post, and ironically enough, it was due to an upgrade problem.

I don't know if that problem reappeared or whether it is something else--sometimes there can be funky things in the database that cause problems on their own.

Here's how you can see what's going on if you're comfortable reading SQL:
  • Make sure this is on a development copy of your site
  • If you've restored the database, try the upgrade again and let it fail
  • Look in your civicrm directory to CRM/Upgrade/Incremental/sql/4.2.3.mysql.tpl - that's the file that CiviCRM is using to run that 4.2.3 step of your upgrade
  • You can walk through each query to see if it has been done. For example, check your database to see if the row in civicrm_navigation with the name "New SMS" has has_separator equal to null.  If that's set, look at the next query: see if there's a row in civicrm_navigation with the name equal to "Find Mass SMS"
  • When you find a line where the result hasn't already been done, you've probably found the culprit.  Test out the query manually on your database.  You will probably need to clear out some bits of Smarty code: the {ts} and {/ts} are for translation, so just delete those; you may need to look around for what populates fhe variables; and the $domain_id is generally 1 unless you have a multidomain CiviCRM
  • You'll probably find something is already inserted, can't be found, etc.
You can find me at AGH Strategies.
Need help now?  Civi911 is your go-to for CiviCRM support.

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Re: Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
July 18, 2014, 05:12:24 pm
Hi sfeher,

I'm sorry to hear that you're still having problems.

Rather than running an upgrade, would it be better to export and then re-import your civi data into a fresh install?

You can find your custom files if you have a custom php or custom templates folder in your WordPress CiviCRM directory.
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

sfeher

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: WordPress 3.9.1
  • MySQL version: 5.5
  • PHP version: 5.4
Re: Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
July 22, 2014, 02:19:00 pm
 JohnFF --

Is there a utility somewhere inside Vers 4.2.6 to "IMPORT" a previous version of the Civi DB?    I don't see any tool that will import data here. 

Really starting to get frustrated with this product.  I am sure that the greatest problem is my lack of familiarity with the software, but I'm tired of banging my head against the wall looking for the 'right' way to go about this update. 

Please -- please -- help me get this right!



Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
July 22, 2014, 10:14:38 pm
You would have to use the web interface to Export into CSV whatever data you need, and then use the web interface on the new install to Import those CSV files.
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.

sfeher

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: WordPress 3.9.1
  • MySQL version: 5.5
  • PHP version: 5.4
Re: Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
July 24, 2014, 01:03:22 pm
Hershel --

not to sound like an idiot, but can you please clarify for me?
I see NO web interface in CiviCRM to allow an export of the data.   There IS a web interface through cPanel that enables me to export the data from MySQL, of course, but when I do this, the upgrade simply INHERITS the problems and I can't get the data to import/upgrade correctly. 

This should be a 5 minute job, and I've spent 5 days on this......  Surely it must be easier, right?

Please advise....
Thanks,

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
July 24, 2014, 01:06:11 pm
See:

http://book.civicrm.org/user/current/common-workflows/exporting-data/
http://wiki.civicrm.org/confluence/display/CRMDOC40/Exporting+Data
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.

sfeher

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: WordPress 3.9.1
  • MySQL version: 5.5
  • PHP version: 5.4
Re: Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6
July 24, 2014, 01:47:23 pm
Hershel,

The entire method of importing/exporting data from a previous version into current appears to me to be  absolutely ridiculous. 

First of all, there's no way to select "Export All" from the contacts in the older (4.2.1) version.    All I can do is select Primary Fields (at the risk of losing/ignoring some non-primary data) or choose to select which fields I want, which would result in manually mapping hundreds of fields.

Second, even if I could manage to get an export of the file, the import would apparently fail, because of file size restrictions (2MB).   I have 14k contacts to import!!!    Not to mention the donations, history, etc. in other tables. 

Is this actually how you all manage data from version to version?   There's no other way to upload/update data from version 4.2.1 beyond 4.2.3?   

Struggling to find value in this software.....



 

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrading WordPress install of CiviCRM from 4.2.1 to 4.4.6

This forum was archived on 2017-11-26.