Fatal Error making contribution after redirect
Created by: magnolia61
When I enable the GDPR consent for contribution pages I get the following error when making a payment. It occurs after the redirect back to the site from the payment provider. Instead of the thank you page I get a fatal error:
Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
At first I thought it was payment provider related, but examining the log I suspect this extension plays a part. Not sure which part yet though...
[info] $backTrace = #0 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/CRM/Core/Error.php(381): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/CRM/Core/DAO.php(1130): CRM_Core_Error::fatal()
#2 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm_extensions/uk.co.vedaconsulting.gdpr/gdpr.php(259): CRM_Core_DAO::getFieldValue("CRM_Contribute_DAO_Contribution", NULL, "contact_id", "trxn_id")
#3 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/CRM/Utils/Hook.php(274): gdpr_civicrm_buildForm("CRM_Contribute_Form_Contribution_ThankYou", Object(CRM_Contribute_Form_Contribution_ThankYou))
#4 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/CRM/Utils/Hook/DrupalBase.php(84): CRM_Utils_Hook->runHooks((Array:251), "civicrm_buildForm", 2, "CRM_Contribute_Form_Contribution_ThankYou", Object(CRM_Contribute_Form_Contribution_ThankYou), NULL, NULL, NULL, NULL)
#5 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php(90): CRM_Utils_Hook_DrupalBase->invokeViaUF(2, "CRM_Contribute_Form_Contribution_ThankYou", Object(CRM_Contribute_Form_Contribution_ThankYou), NULL, NULL, NULL, NULL, "civicrm_buildForm")
#6 [internal function](): Civi\Core\CiviEventDispatcher::delegateToUF(Object(Civi\Core\Event\GenericHookEvent), "hook_civicrm_buildForm", Object(Civi\Core\CiviEventDispatcher))
#7 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(164): call_user_func((Array:2), Object(Civi\Core\Event\GenericHookEvent), "hook_civicrm_buildForm", Object(Civi\Core\CiviEventDispatcher))
#8 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(53): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch((Array:1), "hook_civicrm_buildForm", Object(Civi\Core\Event\GenericHookEvent))
#9 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php(167): Symfony\Component\EventDispatcher\EventDispatcher->dispatch("hook_civicrm_buildForm", Object(Civi\Core\Event\GenericHookEvent))
#10 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php(47): Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch("hook_civicrm_buildForm", Object(Civi\Core\Event\GenericHookEvent))
#11 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/CRM/Utils/Hook.php(164): Civi\Core\CiviEventDispatcher->dispatch("hook_civicrm_buildForm", Object(Civi\Core\Event\GenericHookEvent))
#12 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/CRM/Utils/Hook.php(425): CRM_Utils_Hook->invoke((Array:2), "CRM_Contribute_Form_Contribution_ThankYou", Object(CRM_Contribute_Form_Contribution_ThankYou), NULL, NULL, NULL, NULL, "civicrm_buildForm")
#13 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/CRM/Core/Form.php(576): CRM_Utils_Hook::buildForm("CRM_Contribute_Form_Contribution_ThankYou", Object(CRM_Contribute_Form_Contribution_ThankYou))
#14 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm()
#15 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contribute_Form_Contribution_ThankYou), "display")
#16 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution_ThankYou), "display")
#17 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display")
#18 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/CRM/Core/Invoke.php(309): CRM_Core_Controller->run((Array:3), NULL)
#19 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:15))
#20 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#21 /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/drupal/civicrm.module(445): CRM_Core_Invoke::invoke((Array:3))
#22 /var/www/vhosts/xyz/webroot/includes/menu.inc(527): civicrm_invoke("contribute", "transact")
#23 /var/www/vhosts/xyz/webroot/index.php(21): menu_execute_active_handler()
#24 {main}