Fixed Payment profiles Unable to delete

GTAForce

Member
Affected version
2.0.10
Unable to delete payment configuration and display the following error:
Code:
ErrorException: Fatal Error: Call to a member function getPurchasablesByProfileId() on null src/XF/Admin/Controller/PaymentProfile.php:149
Generated by: GTAForce Nov 6, 2018 at 20:00
Stack trace
#0 [internal function]: XF::handleFatalError()
#1 {main}
Request state
array(4) {
  ["url"] => string(194) "/admin.php?payment-profiles/gtaforce-by-gtahim.1/delete&_xfRequestUri=%2Fadmin.php%3Fpayment-profiles%2F&_xfWithData=1&_xfToken=1541534449%2Cc8e5ac0b437f5532d0011fa81b25d80f&_xfResponseType=json"
  ["referrer"] => string(48) "https://gtaforce.com/admin.php?payment-profiles/"
  ["_GET"] => array(5) {
    ["payment-profiles/gtaforce-by-gtahim_1/delete"] => string(0) ""
    ["_xfRequestUri"] => string(28) "/admin.php?payment-profiles/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(43) "1541534449,c8e5ac0b437f5532d0011fa81b25d80f"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }

and PayPal is not working! PayPal does not work when the user upgrades:

Code:
{"ack":"success","data":{"status":"success","count":1},"meta":{"calc":"d104238934d3","rlog":"bg6dNFlKZaF%2BHDAFHS5jg%2B%2FISvHpUXiajzTcYAc1OomMu3Dw5UZv2jF6zVX98lzjF5Dlfv%2F8olgU5vKZJ0vX5A_166eab52523"}}
 
Last edited:
Have you installed any add-ons that added purchasable things? If so, it looks like you may have uninstalled it and it didn't clean itself up. Ideally, you'd want to contact the author, though we can probably handle this more gracefully.

Your second comment about PayPal not working seems to be unrelated and would probably be better in troubleshooting. I don't think that code is from the PayPal system, though it might be from Braintree. We'd really need a more extensive explanation of what happens, etc.
 
Have you installed any add-ons that added purchasable things? If so, it looks like you may have uninstalled it and it didn't clean itself up. Ideally, you'd want to contact the author, though we can probably handle this more gracefully.

Your second comment about PayPal not working seems to be unrelated and would probably be better in troubleshooting. I don't think that code is from the PayPal system, though it might be from Braintree. We'd really need a more extensive explanation of what happens, etc.

thank you for your reply! I will provide further error code

Yes, I deleted the donation attachment, but I don't know what to clear, if you have time to give me these file paths that need to be cleaned up, or support

Code:
Error: Call to a member function getPurchasablesByProfileId() on null src/XF/Admin/Controller/PaymentProfile.php:149
Generated by: admin Nov 12, 2018 at 20:05
Stack trace
#0 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\PaymentProfile->actionDelete(Object(XF\Mvc\ParameterBag))
#1 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:PaymentProfi...', 'Delete', 'json', Object(XF\Mvc\ParameterBag), 'paymentProfiles', Object(XF\Admin\Controller\PaymentProfile), NULL)
#2 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#3 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#4 src/XF.php(329): XF\App->run()
#5 admin.php(13): XF::runApp('XF\\Admin\\App')
#6 {main}
Request state
array(4) {
  ["url"] => string(190) "/admin.php?payment-profiles/conqueror-menu.1/delete&_xfRequestUri=%2Fadmin.php%3Fpayment-profiles%2F&_xfWithData=1&_xfToken=1542053122%2C053805f1f6bfc41e4b95d438f3ca7d61&_xfResponseType=json"
  ["referrer"] => string(48) "https://gtaforce.com/admin.php?payment-profiles/"
  ["_GET"] => array(5) {
    ["payment-profiles/conqueror-menu_1/delete"] => string(0) ""
    ["_xfRequestUri"] => string(28) "/admin.php?payment-profiles/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(43) "1542053122,053805f1f6bfc41e4b95d438f3ca7d61"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}
 
Thank you for reporting this issue. The issue is now resolved and we are aiming to include that in a future XF release (2.0.11).

Change log:
Prevent an error when trying to delete a payment profile when there is an invalid purchasable definition.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Back
Top Bottom