0

Brand new Civi installation on a brand new Drupal 10 site. Followed the instructions on the Civi documentation. Everything checks out in the Drupal Status; everything seems to have installed corrected.

But when I try to go to Civicrm home to configure, I get a DB error: constraint violation.

Debug gives me this:

`Location https://edboost.org/edboost.org/web/civicrm

Referrer https://edboost.org/edboost.org/web/admin/config/development/performance

Message Deprecated function: Function strftime() is deprecated in Log_file->log() (line 294 of /home/vsource4/www/www/edboost.org/vendor/pear/log/Log/file.php) #0 /home/vsource4/www/www/edboost.org/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real(8192, 'Function strfti...', '/home/vsource4/...', 294) #1 /home/vsource4/www/www/edboost.org/vendor/pear/log/Log/file.php(294): _drupal_error_handler(8192, 'Function strfti...', '/home/vsource4/...', 294) #2 /home/vsource4/www/www/edboost.org/vendor/civicrm/civicrm-core/CRM/Core/Error.php(604): Log_file->log('$backTrace = #0...', 7) #3 /home/vsource4/www/www/edboost.org/vendor/civicrm/civicrm-core/CRM/Core/Error.php(576): CRM_Core_Error::debug_log_message('$backTrace = #0...', false, '', 7) #4 /home/vsource4/www/www/edboost.org/vendor/civicrm/civicrm-core/CRM/Core/Error.php(747): CRM_Core_Error::debug_var('backTrace', '#0 /home/vsourc...', true, true, '', 7) #5 /home/vsource4/www/www/edboost.org/vendor/civicrm/civicrm-core/CRM/Core/Error.php(443): CRM_Core_Error::backtrace('backTrace', true) #6 /home/vsource4/www/www/edboost.org/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(Civi\Core\Exception\DBQueryException)) #7 /home/vsource4/www/www/edboost.org/web/modules/contrib/civicrm/src/Civicrm.php(88): CRM_Core_Invoke::invoke(Array) #8 /home/vsource4/www/www/edboost.org/web/modules/contrib/civicrm/src/Controller/CivicrmController.php(83): Drupal\civicrm\Civicrm->invoke(Array) #9 [internal function]: Drupal\civicrm\Controller\CivicrmController->main(Array, '') #10 /home/vsource4/www/www/edboost.org/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #11 /home/vsource4/www/www/edboost.org/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() #12 /home/vsource4/www/www/edboost.org/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #13 /home/vsource4/www/www/edboost.org/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #14 /home/vsource4/www/www/edboost.org/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() #15 /home/vsource4/www/www/edboost.org/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #16 /home/vsource4/www/www/edboost.org/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /home/vsource4/www/www/edboost.org/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /home/vsource4/www/www/edboost.org/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /home/vsource4/www/www/edboost.org/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /home/vsource4/www/www/edboost.org/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /home/vsource4/www/www/edboost.org/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /home/vsource4/www/www/edboost.org/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /home/vsource4/www/www/edboost.org/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /home/vsource4/www/www/edboost.org/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /home/vsource4/www/www/edboost.org/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /home/vsource4/www/www/edboost.org/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #27 /home/vsource4/www/www/edboost.org/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #28 {main}`

Has anyone encountered this? I'm not sure where to go from here (long time Civi user, but struggling to get this new install up and running).

Thanks in advance! -tiffani

1 Answer 1

1

Not sure what to say. Worked on this site all day and got the same DB error for hours. Suddenly, tonight, sat down to do some more work and for the first time in 3 different iterations of this site, I accessed Civi and I'm in the process of configuring.

I still don't know what caused it to get over its error, but wanted to note that it does seem to have solved itself (I was at a loss so while I worked on other parts of the site, I did not manage anything to solve the civi problem).

Best of luck to anyone else who encounters this! -tiffani

4
  • 1
    Good that it's working but just noting two things: (1) Your urls include "web" which suggests you have the web server set up to have the site one level "higher" than usual. Normally the document_root is set to point to the web folder so it isn't in the url. (2) The error you posted isn't a DB Error, and it possibly suggests you have an unpatched pear/log, meaning that your top-level composer.json does not have "extra": { "enable-patching": true, in it, or it does but the patches didn't run during composer download/install.
    – Demerit
    Commented May 24 at 15:20
  • Thank you for the insights. I've been trying to figure out the web thing myself. My installation is at www/www/edboost.org which, in the past has meant my root was at EdBoost.org. But when I installed Drupal it sent me to edboost.org/edboost.org/web. And now I realize that the base URL for my civi install is edboost.org/edboost.org/web/edboost.org/web, which is causing my other problems. I'm new to Composer. Do you think there's something about how I'm installing that's creating these additional levels (which are not actual directories)? Commented May 24 at 18:33
  • And, actually, I finally got Civi working last night, but when I tried to import contacts this morning, I got the error saying my base_URL was incorrect. Changing it has let to a Critical Error for the entire site. I do want to get this right, but I'm just not sure what to do. Trying to following all installation instructions to a T but getting these weird settings. I'd appreciate any advice. And I'll check out the composer. json and look for that setting. THANK YOU! Commented May 24 at 18:36
  • 1
    @Demerit, thank you for the insights. I ended up reinstalling Drupal and Civi and have them on the correct root now (finally) which has resolved many of my issues. Appreciate the flag. Commented May 28 at 19:11

Your Answer

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

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