[TH] Donate [Deleted]

@mattrogowski - I opened a ticket over on TH but with XF2.3.6 (ugpraded from 2.3.4) I'm seeing a healthy number of errors with TH Donate on my active campaign.

Code:
XF\Db\Exception: MySQL query error [1264]: Out of range value for column 'cost_amount' at row 1 src/XF/Db/AbstractStatement.php:230
Generated by: Unknown account Feb 23, 2025 at 10:47 PM
Stack trace
INSERT  INTO `xf_purchase_request` (`request_key`, `user_id`, `provider_id`, `payment_profile_id`, `purchasable_type_id`, `cost_amount`, `cost_currency`, `extra_data`, `purchase_request_id`, `provider_metadata`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(207): XF\Db\AbstractStatement->getException('MySQL query err...', 1264, '22003')
#1 src/XF/Db/Mysqli/Statement.php(83): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1264, '22003')
#2 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(219): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1572): XF\Db\AbstractAdapter->insert('xf_purchase_req...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1300): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Repository/PurchaseRepository.php(25): XF\Mvc\Entity\Entity->save()
#7 src/XF/Pub/Controller/PurchaseController.php(32): XF\Repository\PurchaseRepository->insertPurchaseRequest(Object(XF\Purchasable\Purchase))
#8 src/addons/ThemeHouse/Donate/XF/Pub/Controller/Purchase.php(22): XF\Pub\Controller\PurchaseController->actionIndex(Object(XF\Mvc\ParameterBag))
#9 src/addons/ThemeHouse/Monetize/XF/Pub/Controller/Purchase.php(60): ThemeHouse\Donate\XF\Pub\Controller\Purchase->actionIndex(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(362): ThemeHouse\Monetize\XF\Pub\Controller\Purchase->actionIndex(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Purchase', 'Index', Object(XF\Mvc\RouteMatch), Object(ThemeHouse\Monetize\XF\Pub\Controller\Purchase), NULL)
#12 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(ThemeHouse\Monetize\XF\Pub\Controller\Purchase), NULL)
#13 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#15 src/XF.php(806): XF\App->run()
#16 index.php(23): XF::runApp('XF\\Pub\\App')
#17 {main}
Request state
array(4) {
  ["url"] => string(43) "/purchase/th_donate_campaign/?campaign_id=7"
  ["referrer"] => string(35) "https://mysite.com/"
  ["_GET"] => array(2) {
    ["/purchase/th_donate_campaign/"] => string(0) ""
    ["campaign_id"] => string(1) "7"
  }
  ["_POST"] => array(9) {
    ["_xfToken"] => string(8) "********"
    ["anonymous"] => string(1) "1"
    ["cost_amount"] => string(9) "509756711"
    ["custom_amount"] => string(1) "0"
    ["disclose_amount"] => string(1) "1"
    ["message"] => string(3) "555"
    ["message_html"] => string(3) "555"
    ["payment_profile_id"] => string(1) "2"
    ["recurring"] => string(1) "1"
  }
}
 
Thanks, have seen your ticket and will prepare a new build at some point.

It's not related to upgrading from 2.3.4, it's because a user has entered an amount of 509756711 which is too high. Would have always been a bug, I guess nobody has entered such a high number before.
 
Thanks, have seen your ticket and will prepare a new build at some point.

It's not related to upgrading from 2.3.4, it's because a user has entered an amount of 509756711 which is too high. Would have always been a bug, I guess nobody has entered such a high number before.

Oh really? I'm waiting for that payout hahahaha.... thanks for the quick update. It started right after my upgrade by sheer coincidence
 
I'm so glad to see that there is still support for Xenforo upgrades.

Thank you so much for this wonderful and much needed addon. It's perfect and you did a great job with it.

I'll be updating my Xenforo version soon. I'm also on 2.3.4 and I was worried that if I upgraded, Donate would stop working.
 
@mattrogowski and themehouse team, having great problems opening tickets on your themehouse site these days so putting it here.

Latest Donate with XF2.3.

Couple of issues:

1. Campaign cover image - can't seem to apply one. I have tried multiple images, formats, sizes (even an old one from a previous campaign that worked back on XF2.2) - keeps saying provided file is not a valid image.

2. Hide amounts option - not sure that's working as expected as I still see campaign totals for a monthly recurring campaign both on the donation page and widget. I thought/would like to hide it all so no totals are shown to users.
 
@mattrogowski and themehouse team, having great problems opening tickets on your themehouse site these days so putting it here.

Latest Donate with XF2.3.

Couple of issues:

1. Campaign cover image - can't seem to apply one. I have tried multiple images, formats, sizes (even an old one from a previous campaign that worked back on XF2.2) - keeps saying provided file is not a valid image.

2. Hide amounts option - not sure that's working as expected as I still see campaign totals for a monthly recurring campaign. I thought/would like to hide it all so no totals are shown to users.
About the image, the reason is that the Addon cannot handle the .webp format well. If you have the Xenforo image optimization converter enabled in your settings, when you try to upload a jpg, png or some other image format, it is converted to webp and the addon gives an invalid format message.

I was able to solve the problem by disabling the automatic conversion option, adding the banner, and then re-enabling it.
 
About the image, the reason is that the Addon cannot handle the .webp format well. If you have the Xenforo image optimization converter enabled in your settings, when you try to upload a jpg, png or some other image format, it is converted to webp and the addon gives an invalid format message.

I was able to solve the problem by disabling the automatic conversion option, adding the banner, and then re-enabling it.

Aah, good suggestions thank you :) Hopefully the TH crew can fix it too.
 
I am trying to make a new campaing and trying to upload the same image that I used before. But the addon isnt accepting my png images.
Maybe its a bug. I dont know. The image is the same that I used every month. I tried with jpg and the same error is displayed.
View attachment 310108
Yes, I had this problem back then, but I think I found the solution on my own and just forgot about it.
 
Back
Top Bottom