[TH] Donate

[TH] Donate 1.1.8 Patch Level 1

No permission to download
Purely FYI for you, anonymous donations where a user is selected to be alerted in options, causes this error:

Code:
Server error log
LogicException: Instances of XF\Db\AbstractAdapter cannot be serialized or unserialized src/XF/Db/AbstractAdapter.php:559
Generated by: Unknown account Aug 12, 2018 at 1:17 PM
Stack trace
#0 [internal function]: XF\Db\AbstractAdapter->__sleep()
#1 src/XF/Mvc/Entity/ValueFormatter.php(67): serialize(Array)
#2 src/XF/Mvc/Entity/Manager.php(721): XF\Mvc\Entity\ValueFormatter->encodeValueForSource(65544, Array)
#3 src/XF/Mvc/Entity/Entity.php(1382): XF\Mvc\Entity\Manager->encodeValueForSource(65544, Array)
#4 src/XF/Mvc/Entity/Entity.php(1121): XF\Mvc\Entity\Entity->_saveToSource()
#5 src/XF/Repository/UserAlert.php(116): XF\Mvc\Entity\Entity->save()
#6 src/XF/Repository/UserAlert.php(87): XF\Repository\UserAlert->insertAlert(1, 0, '', 'user', 1, 'thdonate', Array)
#7 src/addons/ThemeHouse/Donate/Repository/Donation.php(73): XF\Repository\UserAlert->alert(Object(xenMade\STNS\XF\Entity\User), 0, '', 'user', 1, 'thdonate', Array)
#8 src/addons/ThemeHouse/Donate/Repository/Donation.php(45): ThemeHouse\Donate\Repository\Donation->sendDonationAlert(Object(xenMade\STNS\XF\Entity\User), 10, NULL)
#9 src/addons/ThemeHouse/Donate/Purchasable/Campaign.php(211): ThemeHouse\Donate\Repository\Donation->sendDonationAlerts(10, NULL)
#10 src/XF/Payment/AbstractProvider.php(164): ThemeHouse\Donate\Purchasable\Campaign->completePurchase(Object(XF\Payment\CallbackState))
#11 payment_callback.php(62): XF\Payment\AbstractProvider->completeTransaction(Object(XF\Payment\CallbackState))
#12 {main}
Request state
array(4) {
  ["url"] => string(40) "/payment_callback.php?_xfProvider=paypal"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["_xfProvider"] => string(6) "paypal"
  }
  ["_POST"] => array(33) {

    Removed payment data.

  }
}
 
Last edited:
I still don't get this, and I have to rebuild the donation cache every time to get the donations to show up only on the widget. Are you SURE this is working, because it makes no sense that everything else on the website would update, but not this widget.
Mine works fine. Latest XF2, latest add-on version - I suspect you may have a caching issue vs the widget not working.

This is strange. I've been through most of this thread looking for people who are linking their website with this add-on installed. Most people are not using the Top Donors widget, so I couldn't check if it was working for them. However I did find one website with this widget, https://www.cozworld.com/donate/ by @CoZmicShReddeR. And his too has not updated properly:

Total donations by CoZmicShReddeR = $231.80 (4 x $57.95)
Top donors widget, CoZmicShReddeR = $115.90

cozworld.webp

So clearly he has the same problem as me. Every other part of the system is calculating the totals correctly, I can see the payment in my XenForo payment provider logs, it is only this widget that doesn't update whether through a member donation or a backend donation.

The only way to get it to update is to manually rebuild the user donation caches.

Thanks - I hope this helps get to the bottom of the issue.

ANOTHER QUESTION

In the TopDonors.php widget, there is a default option for the number of donors to be listed, set to 5 ('limit' => 5). Where can we change this in the options to increase the number? If I manually edit this file it will show the number I wish, but obviously I don't want to be manually editing files every time.
 
Widgets options are changed in widget settings.

Are all 4 x payments in the same campaign? If you have created multiple campaigns OR if you donated in a campaign, it is disabled, it will not calculate.

I have been playing around with this, as I had a single campaign that just renewed yearly from XF1 TH donate, and it isn't compatible after import, as it shows the entire campaign history total of $17k donations, which is far beyond the annual goal.

If I turned it off, all donations in that campaign stopped being calculated in donor blocks and such.

So I had to set an end date, already gone. Created a new campaign from the upgrade date with the difference for the year. Leave existing campaigns active.

Go to the widget, change the calculation field to all campaigns and not just the current campaign. Then my widget blocks correctly calculated across the campaigns.
 
Ok... this is one of my top donor widgets. At the bottom, read carefully. This widget I only want to show my current campaign, so the campaign is selected AND the checkbox to show only the current campaign donor figures.

Screen Shot 2018-08-12 at 7.50.26 pm.webp

This next one show top donors, all time, so uses all my campaigns (x2 of them). I select all campaigns from the dropdown, I uncheck to use campaign context, as I don't want it default using my current campaign only donations amounts for each donor. I want it using them all, from both campaigns, one of which is expired, but active, the other current, active, too.

Screen Shot 2018-08-12 at 7.52.53 pm.webp

Screen Shot 2018-08-12 at 7.54.59 pm.webp

So the difference between both is:

Screen Shot 2018-08-12 at 7.55.34 pm.webp

I'm not saying an issue doesn't exist, because I haven't checked a new setup and I don't run recurring monthly. Run the rebuild cache to ensure the data is right, and it should tally correctly.

Mine seems to working right based on original data in my backup to new donations made.
 
Thanks @Anthony Parsons - I note you do NOT have the option listed that I was asking about above either to change the default number of members listed from 5 :)

I have set up my widget with both configurations shown, but it makes no difference to the problem I am describing. The ONLY way I can get it to update with new information is to manually update the user donations cache - it is not done when I receive or manually add a donation.
 
This is strange. I've been through most of this thread looking for people who are linking their website with this add-on installed. Most people are not using the Top Donors widget, so I couldn't check if it was working for them. However I did find one website with this widget, https://www.cozworld.com/donate/ by @CoZmicShReddeR. And his too has not updated properly:

Total donations by CoZmicShReddeR = $231.80 (4 x $57.95)
Top donors widget, CoZmicShReddeR = $115.90

View attachment 181420

So clearly he has the same problem as me. Every other part of the system is calculating the totals correctly, I can see the payment in my XenForo payment provider logs, it is only this widget that doesn't update whether through a member donation or a backend donation.

The only way to get it to update is to manually rebuild the user donation caches.

Thanks - I hope this helps get to the bottom of the issue.

ANOTHER QUESTION

In the TopDonors.php widget, there is a default option for the number of donors to be listed, set to 5 ('limit' => 5). Where can we change this in the options to increase the number? If I manually edit this file it will show the number I wish, but obviously I don't want to be manually editing files every time.

@Redh You are correct but I think the issue @Anthony Parsons is missing is all my donations were added manually by moderator so the math is wrong it must be for just the manually added donations!
 
Just a feature suggestion for future release:

Consider adding in perhaps a countdown timer (months, days, week, hours, etc.) as a ticked option for donation campaigns? Might be of interest - especially if it could nicely format to the sidebar views as it could create a sense of urgency.
 
Just a feature suggestion for future release:

Consider adding in perhaps a countdown timer (months, days, week, hours, etc.) as a ticked option for donation campaigns? Might be of interest - especially if it could nicely format to the sidebar views as it could create a sense of urgency.
I believe we already offer this within the sidebar widgets, here is a screenshot of it. Just navigate to Appearance -> Widgets -> Select [TH] Donate: Campaign from the drop-down > Fill in all the required information -> Select a campaign - > Click save! :)
 
See I have that setup on my site ....changed it to say "Help with our server costs" because the campaign names don't show on the widget but even with all the information filled out on this bi-monthly re-occurring donation drive it doesn't show the countdown...is that because its re-occurring versus one time? I am Chernabog on your site, if you want to grab our URL and take a peek @Dalton Prock :D
 
See I have that setup on my site ....changed it to say "Help with our server costs" because the campaign names don't show on the widget but even with all the information filled out on this bi-monthly re-occurring donation drive it doesn't show the countdown...is that because its re-occurring versus one time? I am Chernabog on your site, if you want to grab our URL and take a peek @Dalton Prock :D
I am experiencing the same thing on our beta forum so yes the countdown doesn't work when campaigns are recurring. You'd only be able to use the countdown when doing campaigns that are set manually.
 
Great add-on, thank you.

Just to clarify this is correct.. I made a business account today and someone made a small donation for testing purposes and I got charged a paypal fee as a receiver. Is this correct?
 
Top Bottom