Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Incompatible with biz.jmaconsulting.lineitemedit #75

Closed
martst opened this issue Mar 24, 2020 · 7 comments
Closed

Incompatible with biz.jmaconsulting.lineitemedit #75

martst opened this issue Mar 24, 2020 · 7 comments

Comments

@martst
Copy link

martst commented Mar 24, 2020

I am implementing GoCardless on our main site after a lot of work on a test site and I am getting the invalid cache key error at the end of the process. I am using GoCardless 1.19.1 , Civicrm 5.23.3 and Joomla 3.9.10 .
I am using test mode with the sandbox.
The error log is

Mar 24 13:28:51  [info] completeRedirectFlowCiviCore: called with details: {"redirect_flow_id":"RE0002FGYDV9VPSDJS605KZAXDMSGC5A","test_mode":true,"session_token":"7ab78aedc3f412c2abe150f182281633_3802","payment_processor_id":"

Mar 24 13:28:52  [info] completeRedirectFlowWithGoCardless: successfully completed redirect flow RE0002FGYDV9VPSDJS605KZAXDMSGC5A mandate: MD0008ABMPS05A subscription: SB000257FTECN8

Mar 24 13:28:52  [info] completeRedirectFlowCiviCore: EXCEPTION *after* successfully setting up subscription at GoCardless: Invalid cache key: Not a string
#0 /srv/www/vhosts/www.wbct.org.uk/media/civicrm/ext/uk.artfulrobot.civicrm.gocardless/CRM/GoCardlessUtils.php(354): civicrm_api3('Contribution', 'create', Array)
#1 /srv/www/vhosts/www.wbct.org.uk/media/civicrm/ext/uk.artfulrobot.civicrm.gocardless/gocardless.php(176): CRM_GoCardlessUtils::completeRedirectFlowCiviCore(Array)
#2 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/CRM/Utils/Hook.php(290): gocardless_civicrm_buildForm('CRM_Contribute_...', Object(CRM_Contribute_Form_Contribution_ThankYou))
#3 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/CRM/Utils/Hook.php(208): CRM_Utils_Hook->runHooks(Array, 'civicrm_buildFo...', 2, 'CRM_Contribute_...', Object(CRM_Contribute_Form_Contribution_Tha
#4 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/CRM/Utils/Hook/Joomla.php(85): CRM_Utils_Hook->commonInvoke(2, 'CRM_Contribute_...', Object(CRM_Contribute_Form_Contribution_ThankYou), NULL, NULL,
#5 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/Civi/Core/CiviEventDispatcher.php(90): CRM_Utils_Hook_Joomla->invokeViaUF(2, 'CRM_Contribute_...', Object(CRM_Contribute_Form_Contribution_ThankYou
#6 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(184): Civi\Core\CiviEventDispatcher::delegateToUF(Object(Civi\Core\Event\GenericHookEvent), 'ho
#7 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(46): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'hook_civicrm_bu...',
#8 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/Civi/Core/CiviEventDispatcher.php(47): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('hook_civicrm_bu...', Object(Civi\Core\Event\Gen
#9 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/CRM/Utils/Hook.php(172): Civi\Core\CiviEventDispatcher->dispatch('hook_civicrm_bu...', Object(Civi\Core\Event\GenericHookEvent))
#10 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/CRM/Utils/Hook.php(450): CRM_Utils_Hook->invoke(Array, 'CRM_Contribute_...', Object(CRM_Contribute_Form_Contribution_ThankYou), NULL, NULL, NULL,
#11 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php(607): CRM_Utils_Hook::buildForm('CRM_Contribute_...', Object(CRM_Contribute_Form_Contribution_ThankYou))
#12 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form->buildForm()
#13 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contribute_Form_Contribution_ThankYou), 'displa
#14 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution_ThankYou), 'display')
#15 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(335): HTML_QuickForm_Page->handle('display')
#16 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(268): CRM_Core_Controller->run(Array, NULL)
#17 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem(Array)
#18 /srv/www/vhosts/www.wbct.org.uk/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke(Array)

The membership record is partially completed but is missing the dates.

Any help appreciated

Martin

@artfulrobot
Copy link
Owner

Crashing at that point means quite a lot won't be setup correctly (but notably the mandate/subscription is setup).

I've not seen that before. The cache key error is being generated from a simple API call to update the date of the pending contribution.

Some of the API calls were changed in 1.9.2, which I've just released at:
https://github.com/artfulrobot/uk.artfulrobot.civicrm.gocardless/releases/tag/1.9.2

I'd suggest you upgrade to 1.9.2 (it requires a database upgrade, so is one-way - take backups first as usual). Also, I have not done any testing on Joomla - although there's nothing CMS-specific as far as I know.

Finally, I'd welcome you to join the GoCardless chat channel at https://chat.civicrm.org/civicrm/channels/gocardless

@martst
Copy link
Author

martst commented Mar 24, 2020

Thanks for the reply. I have updated to 1.9.2 but unfortunately the error is still the same. I will join the chat channel and see if there are any other ideas.

@martst
Copy link
Author

martst commented Mar 25, 2020

I have found the problem. The assertValidKey function call was from an extension - biz.jmaconsulting.lineitemedit. I disabled the extension and now the process runs to completion. Obviously that extension and GoCardless are not compatible. Thank you for your help

@artfulrobot
Copy link
Owner

@artfulrobot artfulrobot changed the title Invalid cache key: Not a string Incompatible with biz.jmaconsulting.lineitemedit Mar 25, 2020
@artfulrobot
Copy link
Owner

I'm going to leave this open, in case it helps anyone else.

@artfulrobot artfulrobot reopened this Mar 25, 2020
@artfulrobot
Copy link
Owner

Nb. this will be fixed in the JMA extension soon.

@artfulrobot
Copy link
Owner

Closed, as fixed in JMA extension: JMAConsulting/biz.jmaconsulting.lineitemedit#53 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants