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) »
  • 4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
Pages: [1] 2

Author Topic: 4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists  (Read 2559 times)

DerekL

  • I post frequently
  • ***
  • Posts: 132
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.54
  • PHP version: 5.2.17
4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
August 21, 2012, 01:19:23 pm
Hi All,

Almost immediately after starting the upgrade process I receive this lovely message: 

[Error: Upgrade DB to 4.2.alpha1: Price Sets]
DB Error: already exists

Some googling turned up these:

http://issues.civicrm.org/jira/browse/CRM-10253

http://issues.civicrm.org/jira/browse/CRM-10613

Although they bugs are reported as squashed, I'm getting this show-stopper error...


Any ideas?

« Last Edit: August 21, 2012, 03:30:06 pm by DerekL »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: [Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
August 21, 2012, 02:34:44 pm
Are you actually using the 4.2.alpha1 download? Quite a few download bugs were fixed in subsequent 4.2 alpha and beta releases - AND 4.2 stable was released today. Best to download 4.2 stable and start the upgrade again (of course on a test copy of your site :-) ).
Protect your investment in CiviCRM by  becoming a Member!

DerekL

  • I post frequently
  • ***
  • Posts: 132
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.54
  • PHP version: 5.2.17
Re: [Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
August 21, 2012, 03:29:49 pm
Hi Dave,

Yes, I'm referring to 4.2 stable. I downloaded it upon release as we've been waiting for a non-beta release anxiously.

I'm really sorta stuck as the error message doesn't provide any details + I can't seem to find any upgrade logs.

When I skipped through the error (+ all the additional ones caused by skipping the first one I'm sure) civicontribute crashes out due to a missing field in a sql query.  (Our production environment is safe and sound.)

What can I do to get to the bottom of this?

(Any help whatsoever would be super appreciated.)
« Last Edit: August 22, 2012, 08:49:09 am by DerekL »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: 4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
August 22, 2012, 09:03:32 am
Derek - Fastest way to figure this out is if you can email a dump of your DB so we can run the upgrade and see what's happening. I'll send you a PM with more info.
Protect your investment in CiviCRM by  becoming a Member!

Rar9

  • I’m new here
  • *
  • Posts: 23
  • Karma: 0
    • Asset-Trade
  • CiviCRM version: 4.15
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63-0ubuntu0.10.04.1
  • PHP version: 5.3.10-1ubuntu2ppa7~lucid
Re: 4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
August 24, 2012, 12:25:01 am
This look similar to my error that  just posted... http://forum.civicrm.org/index.php/topic,25756.0.html

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: 4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
August 24, 2012, 05:54:01 am
We investigated the DB and filed an issue here - http://issues.civicrm.org/jira/browse/CRM-10702.

An immediate work around could be applying the below patch ( would recommend to take patch from the jira issue once ready ) -
Code: [Select]
Index: CRM/Upgrade/Incremental/php/FourTwo.php
===================================================================
--- CRM/Upgrade/Incremental/php/FourTwo.php (revision 42061)
+++ CRM/Upgrade/Incremental/php/FourTwo.php (working copy)
@@ -375,7 +375,7 @@
       $setParams['name'] = $pageTitle;
     }
     else {
-      $setParams['name'] = $pageTitle . '_' . rand(1, 99);
+      $setParams['name'] = $pageTitle . '_' . rand(1, 40000);
     }
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

DerekL

  • I post frequently
  • ***
  • Posts: 132
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.54
  • PHP version: 5.2.17
Re: 4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
August 24, 2012, 09:30:06 am
Hi Deepak,

I appreciate the help!

I downloaded the 4 raw files from the jira ticket and replaced my stock 4.2 files with them.

Unfortunately, I'm still getting an error:

[Error: Upgrade DB to 4.2.alpha1: SQL]
DB: Error: already exists

message, and a hard stop.
---
Note: The error is now no longer [Error: Upgrade DB to 4.2.alpha1: Price Sets], but [Error: Upgrade DB to 4.2.alpha1: SQL].


In addition, I tried replacing the timestamp append with the expanded rand range suggested above, with the same results.  :(

Any ideas? Any way to make the errors more verbose?
« Last Edit: August 24, 2012, 10:01:34 am by DerekL »

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: 4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
August 25, 2012, 03:29:27 am
Derek, you will also need to restore your database from backup before re-trying the upgrade.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

DerekL

  • I post frequently
  • ***
  • Posts: 132
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.54
  • PHP version: 5.2.17
Re: 4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
August 27, 2012, 09:21:32 am
Deepak, thanks for the response. I'm restoring a fully blank-slate snapshot of the site onto my local dev to test again now.


ylavoie

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
    • Regroupement de l'industrie électronique du Québec
  • CiviCRM version: 4.2.4
  • CMS version: Joomla 2.5.7
  • MySQL version: 5.5.24
  • PHP version: 5.3.10
Re: 4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
August 28, 2012, 09:53:54 pm
I am also experimenting the same problem when upgrading from 4.1.5 to 4.2.

I have a multi-lingual system and upgrade was initialy failing with 8 invalid views (probably leftovers from previous updates). After removal of civicrm_group_en_US view and 7 other similar (it_IT, es_ES, fr_CA and same for civicrm_survey_en_US...), and now have DB Error: already exists during the DB upgrade.

The error happens when passing through the 4.2alpha1 step.

Any suggestions?

Thanks,

Yves

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: 4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
August 28, 2012, 11:55:38 pm
Yves,

Check the logs to see the detailed error messages.

Also apply the patch from http://issues.civicrm.org/jira/browse/CRM-10702 and see if that helps.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

DerekL

  • I post frequently
  • ***
  • Posts: 132
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.54
  • PHP version: 5.2.17
Re: 4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
August 29, 2012, 08:04:44 am
I stand very gratefully corrected!

The patch resolved my situation handily, Civi 4.1.1 to 4.2 complete!

( First failure must have been caused by my not dropping the db before restoring. )

Thanks Deepak!

ylavoie

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
    • Regroupement de l'industrie électronique du Québec
  • CiviCRM version: 4.2.4
  • CMS version: Joomla 2.5.7
  • MySQL version: 5.5.24
  • PHP version: 5.3.10
Re: 4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
September 02, 2012, 10:00:26 am
CRM-10702 was part of the solution.

After carefull examination, I found out that table civicrm_sms_provider was already there and was preventing 4.2alpha1 to succeed. After both fixes, everything went well.

Thanks

Rar9

  • I’m new here
  • *
  • Posts: 23
  • Karma: 0
    • Asset-Trade
  • CiviCRM version: 4.15
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63-0ubuntu0.10.04.1
  • PHP version: 5.3.10-1ubuntu2ppa7~lucid
Re: 4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
September 04, 2012, 11:57:54 pm
Quote from: ylavoie on September 02, 2012, 10:00:26 am
CRM-10702 was part of the solution.

After carefull examination, I found out that table civicrm_sms_provider was already there and was preventing 4.2alpha1 to succeed. After both fixes, everything went well.

Thanks

Just a quick question... are the fixes in the current 4.20 download version? 
If not how can I apply these to upgrade without errors?

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: 4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists
September 05, 2012, 12:35:11 am
Rar9, You will still have to apply patch from - http://issues.civicrm.org/jira/browse/CRM-10702 or wait for v4.2.1.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • 4.2 Stable[Error: Upgrade DB to 4.2.alpha1: Price Sets] DB Error: already exists

This forum was archived on 2017-11-26.