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 to 4.0.2 error
Pages: [1]

Author Topic: Upgrading to 4.0.2 error  (Read 963 times)

williamgurumayum

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
  • CiviCRM version: 4.1.5.
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.0.95
  • PHP version: 5.3
Upgrading to 4.0.2 error
December 20, 2012, 11:28:43 am
Hello,
I am out of my wits. I tried upgrading from 4.0.1 to 4.0.2 and results in some error while doing DB upgrade process. Attaching the error message screen.
Please help!!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrading to 4.0.2 error
December 20, 2012, 12:33:41 pm
Can you open up the section where it says "Error Details"? That's what we need.
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.

williamgurumayum

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
  • CiviCRM version: 4.1.5.
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.0.95
  • PHP version: 5.3
Re: Upgrading to 4.0.2 error
December 20, 2012, 11:40:55 pm
It doesn't show anything.. when i click on it, nothing happens. That's why i am out of my wits....
I have enabled Debugging and Backtrace features, but nothing turns up..
« Last Edit: December 20, 2012, 11:42:52 pm by williamgurumayum »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrading to 4.0.2 error
December 21, 2012, 03:10:07 am
If you can, use Firefox with Firebug installed. Then right click on that and "Inspect Element" Then you will see the CSS classes used for that section and the one below it. If you change those classes, or just delete them, the section will magically open it.

If that fails, then do View Source for the whole page and post that.
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.

williamgurumayum

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
  • CiviCRM version: 4.1.5.
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.0.95
  • PHP version: 5.3
Re: Upgrading to 4.0.2 error
December 21, 2012, 05:56:02 am
AHA.. got this error message on the Source

Code: [Select]
  [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => ALTER TABLE civicrm_msg_template ADD COLUMN `pdf_format_id` int(10) unsigned default NULL COMMENT 'FK to civicrm_option_value containing PDF Page Format.' [nativecode=1060 ** Duplicate column name 'pdf_format_id']
    [type] => DB_Error
    [user_info] => ALTER TABLE civicrm_msg_template ADD COLUMN `pdf_format_id` int(10) unsigned default NULL COMMENT 'FK to civicrm_option_value containing PDF Page Format.' [nativecode=1060 ** Duplicate column name 'pdf_format_id']
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="ALTER TABLE civicrm_msg_template ADD COLUMN `pdf_format_id` int(10) unsigned default NULL COMMENT 'FK to civicrm_option_value containing PDF Page Format.' [nativecode=1060 ** Duplicate column name 'pdf_format_id']"]

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrading to 4.0.2 error
December 21, 2012, 06:15:33 am
Your error is

Code: [Select]
ALTER TABLE civicrm_msg_template ADD COLUMN `pdf_format_id` int(10) unsigned default NULL COMMENT 'FK to civicrm_option_value containing PDF Page Format.' [nativecode=1060 ** Duplicate column name 'pdf_format_id']

meaning it's trying to add a column "pdf_format_id" to the table "civicrm_msg_template" but that column already exists. Did you run a failed upgrade ever?

I would suggest you find this code:

Code: [Select]
ALTER TABLE civicrm_msg_template ADD COLUMN `pdf_format_id` int(10) unsigned default NULL COMMENT 'FK to civicrm_option_value containing PDF Page Format.'
in the updater code and remove it and then try again.
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.

williamgurumayum

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
  • CiviCRM version: 4.1.5.
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.0.95
  • PHP version: 5.3
Re: Upgrading to 4.0.2 error
December 21, 2012, 09:23:51 am
I could not find the updater SQL code in the usual location that is administrator/components/com_civicrm/civicrm/CRM/Upgrade/Incremental/sql

Can you please instruct me on how can i find the updater code?

Thanks

williamgurumayum

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
  • CiviCRM version: 4.1.5.
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.0.95
  • PHP version: 5.3
Re: Upgrading to 4.0.2 error
December 21, 2012, 09:38:27 am
UPDATE:
found it in administrator/components/com_civicrm/civicrm/CRM/Upgrade/Incremental/sql/3.4.2.mysql.tpl
Now another error is showing up, this time it is a little tricky..

Code: [Select]
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -5
    [message] => DB Error: already exists
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_option_group
    (`name`, description, `is_reserved`, `is_active`)
VALUES
    ('paper_size'  , 'Paper Size'          , 0 , 1 ),
    ('pdf_format'  , 'PDF Page Format'     , 0 , 1 ),
    ('label_format', 'Mailing Label Format', 0 , 1 ) [nativecode=1062 ** Duplicate entry 'paper_size' for key 'UI_name']
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_option_group
    (`name`, description, `is_reserved`, `is_active`)
VALUES
    ('paper_size'  , 'Paper Size'          , 0 , 1 ),
    ('pdf_format'  , 'PDF Page Format'     , 0 , 1 ),
    ('label_format', 'Mailing Label Format', 0 , 1 ) [nativecode=1062 ** Duplicate entry 'paper_size' for key 'UI_name']
    [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_option_group
    (`name`, description, `is_reserved`, `is_active`)
VALUES
    ('paper_size'  , 'Paper Size'          , 0 , 1 ),
    ('pdf_format'  , 'PDF Page Format'     , 0 , 1 ),
    ('label_format', 'Mailing Label Format', 0 , 1 ) [nativecode=1062 ** Duplicate entry 'paper_size' for key 'UI_name']"]

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 to 4.0.2 error
December 22, 2012, 11:03:44 am
Hi. Sorry I didn't have time yesterday to find the code for you. For this new issue, find:

Code: [Select]
    ('paper_size'  , 'Paper Size'          , 0 , 1 ),
in the updater SQL and remove that line I think.
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.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrading to 4.0.2 error

This forum was archived on 2017-11-26.