1

The Wordpress database update process from 5.34.0 to 5.55.2 fails right near the end with this error:

Exception: "API error: DB Error: constraint violation on ReportTemplate.create"

Perhaps you know of a quick fix before I have to roll everything back.

Note: civicrm seems to be up and running however -- I haven't seen a bug yet. Perhaps I can ignore this update error?

Edit: Here is the tail end of the log I found hope it's enough:

    #message: "DB Error: constraint violation"
#code: 0
#file: "/home/noyb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php"
#line: 955
trace: {
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php:955 {
    ›   CRM_Core_Error::backtrace('backTrace', TRUE);
    ›   throw new PEAR_Exception($pearError->getMessage(), $pearError);
    › }
  }
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php:944 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB.php:997 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php:575 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php:223 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB/common.php:1928 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB/mysqli.php:943 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB/mysqli.php:413 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB/common.php:1234 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php:2696 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php:1650 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:730 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/PriceSet.php:225 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Price/Form/DeleteSet.php:76 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:573 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php:144 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php:43 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:355 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Price/Page/Set.php:145 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:319 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
  /home/noyb/public_html/wp-content/plugins/civicrm/civicrm.php:1199 { …}
  /home/noyb/public_html/wp-includes/class-wp-hook.php:303 { …}
  /home/noyb/public_html/wp-includes/class-wp-hook.php:327 { …}
  /home/noyb/public_html/wp-includes/plugin.php:470 { …}
  /home/noyb/public_html/wp-admin/admin.php:259 { …}
}

} ]

Nov 27 13:04:43 [debug] $backTrace = #0 /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(441): CRM_Core_Error::backtrace("backTrace", TRUE) #1 /home/noyb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(PEAR_Exception)) #2 /home/noyb/public_html/wp-content/plugins/civicrm/civicrm.php(1199): CRM_Core_Invoke::invoke((Array:3)) #3 /home/noyb/public_html/wp-includes/class-wp-hook.php(303): CiviCRM_For_WordPress->invoke("") #4 /home/noyb/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters("", (Array:1)) #5 /home/noyb/public_html/wp-includes/plugin.php(470): WP_Hook->do_action((Array:1)) #6 /home/noyb/public_html/wp-admin/admin.php(259): do_action("toplevel_page_CiviCRM") #7 {main}

2
  • Please check your CiviCRM logs for the backtrace and edit your question to include it? Otherwise folks will be unable to help you. Nov 27, 2022 at 20:10
  • I added some log info.
    – P a u l
    Nov 28, 2022 at 0:51

1 Answer 1

1

Do you have an Extended report extension installed? If yes, then probably you would need to

  1. Upgrade CiviCRM to 5.46.3
  2. Upgrade the Extended report extension to the latest version.
  3. Upgrade CiviCRM to 5.55.2
  4. Run the extension update db if there are any.

or

  1. Replace the extended report extension folder to latest.
  2. Upgrade CiviCRM to 5.55.2
  3. Run the extension update db if there are any.
2
  • We do actually have a version of that installed but it is not used for anything. Perhaps uninstalling it and repeating the 5.34 to 5.55 update to see what happens.
    – P a u l
    Nov 28, 2022 at 2:13
  • Yes, That might also work Nov 28, 2022 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.