Skip to content
Snippets Groups Projects
Closed CiviCRM 5.47.0 Upgrade Failure with Extended Reports 5.11
  • View options
  • CiviCRM 5.47.0 Upgrade Failure with Extended Reports 5.11

  • View options
  • Closed Issue created by kcristiano

    Logging here as extended reports is widely used.

    CiviCRM 5.46 to 5.47.0 ExtendedReport v 5.11.0 WP 5.8.3 php 7.4

    Upgrade via the UI or CLI fails:

    Exception: "API error: DB Error: constraint violation on ReportTemplate.create"
    #0 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php(375): CRM_Core_ManagedEntities->onApiError("ReportTemplate", "create", (Array:8), (Array:4))
    #1 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php(187): CRM_Core_ManagedEntities->updateExistingEntity(Object(CRM_Core_DAO_Managed), (Array:10))
    #2 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php(167): CRM_Core_ManagedEntities->reconcileEnabledModule("nz.co.fuzion.extendedreport")
    #3 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php(128): CRM_Core_ManagedEntities->reconcileEnabledModules()
    #4 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(413): CRM_Core_ManagedEntities->reconcile()
    #5 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Form.php(818): CRM_Core_Invoke::rebuildMenuAndCaches(FALSE, TRUE)
    #6 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Task.php(73): CRM_Upgrade_Form::doCoreFinish(Object(CRM_Queue_TaskContext), "5.47.alpha1", "5.47.0", "5.47.0", "/tmp/civicrm-post-upgrade7axXs1")
    #7 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Runner.php(215): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
    #8 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Runner.php(169): CRM_Queue_Runner->runNext()
    #9 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Headless.php(49): CRM_Queue_Runner->runAll()
    #10 /home/cvdemo/public_html/wp-content/plugins/civicrm/wp-cli/civicrm.php(1083): CRM_Upgrade_Headless->run()
    #11 /home/cvdemo/public_html/wp-content/plugins/civicrm/wp-cli/civicrm.php(171): CiviCRM_Command->upgradeDB()
    #12 [internal function](): CiviCRM_Command->__invoke((Array:0), (Array:0))
    #13 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func((Array:2), (Array:1), (Array:0))
    #14 [internal function](): WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}((Array:1), (Array:0))
    #15 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(491): call_user_func(Object(Closure), (Array:1), (Array:0))
    #16 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(399): WP_CLI\Dispatcher\Subcommand->invoke((Array:1), (Array:0), (Array:0))
    #17 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(422): WP_CLI\Runner->run_command((Array:2), (Array:0))
    #18 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1194): WP_CLI\Runner->run_command_and_exit()
    #19 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
    #20 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(77): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
    #21 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
    #22 phar:///usr/local/bin/wp/php/boot-phar.php(11): include("phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php")
    #23 /usr/local/bin/wp(4): include("phar:///usr/local/bin/wp/php/boot-phar.php")
    #24 {main}
    Error: API error: DB Error: constraint violation on ReportTemplate.create
    Array
    (
        [is_error] => 1
        [error_message] => API error: DB Error: constraint violation on ReportTemplate.create
    )

    You can either disable extended reports or upgrade extended reports to get the upgrade to succeed.

    This seems to be a new issue as my testing to 5.47-RC did not have this issue. I had not tested upgrading in about a week. The two sites I tested this on are 'demo' sites that had not been on the RC.

    We should be recommending extension updates before Core upgrade, but I was surprised I had this error.

    cc @eileen Let me know if this issue belongs over at the extended report repo.

    Linked items ... 0

  • Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading