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) »
  • RESOLVED:Upgrade script fails 2.2.5 Joomla 1.5.11
Pages: [1]

Author Topic: RESOLVED:Upgrade script fails 2.2.5 Joomla 1.5.11  (Read 1951 times)

alanski

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 5
  • Cup of tea? Yes please
    • Joomkit
  • CiviCRM version: Version in post
  • CMS version: Joomla
  • MySQL version: 5.0
RESOLVED:Upgrade script fails 2.2.5 Joomla 1.5.11
June 08, 2009, 08:50:01 am
Have tried upgrading 2.2 to 2.2.5 on Joomla 1.5.11

The data is backed up and I folowed upgrade instructions.
When I run: index.php?option=com_civicrm&task=civicrm/upgrade&reset=1

i get the following error - back trace is below.

I am wondering whether to leave this installed or revert back - the project beckons!.

Any help appreciated

alanski

Quote
   Sorry. A non-recoverable error has occurred.

    DB Error: already exists

    Database Error Code: Duplicate entry 'civicrm_event-1' for key 2, 1062

    Return to home page.

Error Details:

Array
(
    [callback] => Array
        (
            
  • => CRM_Core_Error
  • [1] => handle
            )

        
Code: [Select]
=> -5
    [message] => DB Error: already exists
    [mode] => 16
    [debug_info] => UPDATE `civicrm_price_set_entity` c SET c.`entity_table`='civicrm_event' WHERE c.`entity_table`='civicrm_event_page' [nativecode=1062 ** Duplicate entry 'civicrm_event-1' for key 2]
    [type] => DB_Error
    [user_info] => UPDATE `civicrm_price_set_entity` c SET c.`entity_table`='civicrm_event' WHERE c.`entity_table`='civicrm_event_page' [nativecode=1062 ** Duplicate entry 'civicrm_event-1' for key 2]
    [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="UPDATE `civicrm_price_set_entity` c SET c.`entity_table`='civicrm_event' WHERE c.`entity_table`='civicrm_event_page' [nativecode=1062 ** Duplicate entry 'civicrm_event-1' for key 2]"]
)
[/quote]


The back trace is :

###################
backTrace

/home/mysitepath/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php, backtrace, 148
, handle,
/home/mysitepath/public_html/administrator/components/com_civicrm/civicrm/packages/PEAR.php, call_user_func, 912
/home/mysitepath/public_html/administrator/components/com_civicrm/civicrm/packages/DB.php, PEAR_Error, 966
/home/mysitepath/public_html/administrator/components/com_civicrm/civicrm/packages/PEAR.php, DB_Error, 574
/home/mysitepath/public_html/administrator/components/com_civicrm/civicrm/packages/DB/common.php, raiseError, 1903
/home/mysitepath/public_html/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php, raiseError, 898
/home/mysitepath/public_html/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
/home/mysitepath/public_html/administrator/components/com_civicrm/civicrm/packages/DB/common.php, simpleQuery, 1216
/home/mysitepath/public_html/administrator/components/com_civicrm/civicrm/CRM/Utils/File.php, query, 230
/home/mysitepath/public_html/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Form.php, sourceSQLFile, 75
/home/mysitepath/public_html/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Form.php, source, 188
/home/mysitepath/public_html/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Form.php, processLocales, 205
/home/mysitepath/public_html/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Page/Upgrade.php, processSQL, 108
/home/mysitepath/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php, run, 205
/home/mysitepath/public_html/administrator/components/com_civicrm/admin.civicrm.php, invoke, 45
/home/mysitepath/public_html/administrator/components/com_civicrm/admin.civicrm.php, civicrm_invoke, 22
/home/mysitepath/public_html/libraries/joomla/application/component/helper.php, require_once, 162
/home/mysitepath/public_html/administrator/includes/application.php, renderComponent, 136
/home/mysitepath/public_html/administrator/index.php, dispatch, 67
/home/mysitepath/public_html/administrator/index2.php, include, 14



« Last Edit: June 09, 2009, 06:46:10 am by alanski »

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: Upgrade script fails 2.2.5 Joomla 1.5.11
June 08, 2009, 04:43:40 pm

did you create a price set for civicrm event id 1 after you upgraded to 2.2. Seems like there is a conflict with two price sets for the same event

your best bet would be to:

1. revert back to 2.2

2. using mysql, delete the priceset where entity_table = 'civicrm_event_page' and entity_id = 1

3. try the upgrade again

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

alanski

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 5
  • Cup of tea? Yes please
    • Joomkit
  • CiviCRM version: Version in post
  • CMS version: Joomla
  • MySQL version: 5.0
Re: Upgrade script fails 2.2.5 Joomla 1.5.11
June 09, 2009, 06:33:15 am
Thanks Lobo will give this a whirl...

alanski

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 5
  • Cup of tea? Yes please
    • Joomkit
  • CiviCRM version: Version in post
  • CMS version: Joomla
  • MySQL version: 5.0
Re: Upgrade script fails 2.2.5 Joomla 1.5.11
June 09, 2009, 06:45:55 am
Great deleting this record from 'civicrm_price_set_entity worked and I got past the install.

I didnt create a second price set but there is an older inactive price set created in version 2.2.0 which is still in the db.
The inactive meesage is for one rice set and one field in the inactive priceset. (Is 'inactive' context specific?)

See how we go now....
Have another question about hooks in Joomla but will post seperately...

cheers

Matt2000

  • I post frequently
  • ***
  • Posts: 288
  • Karma: 27
    • http://www.ninjitsuweb.com
Re: RESOLVED:Upgrade script fails 2.2.5 Joomla 1.5.11
July 05, 2009, 05:14:24 pm
We ran into a similar issue when there were two price_set_entity records keys to civicrm_event_page records that did not exist. (The upgrade script tried to write entity_id '0' twice, triggering unique key error.)

We just deleted the records from price_set_entity that didn't have matches in civicrm_event_page.
Drupal/CiviCRM micro-blogging http://twitter.com/matt2000

Ninjitsu Web Development http://www.NinjitsuWeb.com/

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • RESOLVED:Upgrade script fails 2.2.5 Joomla 1.5.11

This forum was archived on 2017-11-26.