What's new
[XB] Daily Login Streak

[XB] Daily Login Streak [Paid] 1.0.2

No permission to buy ($20.00)

Painbaker

Administrator
Painbaker submitted a new resource:

[XB] Daily Login Strike - Track and reward users for consecutive daily logins with streak stats and calendar views

Track and reward users for consecutive daily logins with streak stats and calendar views.

✨ Features:​

  • 🔄 Streak Tracking:
    • Consecutive daily login streak (resets to 1 if a day is missed)
    • Longest streak achieved (does not reset)
  • 📊 User Criteria:
    • Use streak data for user criteria and promotions
  • 🗓️ Admin Tools:
    • Streaks calendar in ACP
  • 👤 User Display:
    • Member...

Read more about this resource...
 
@Painbaker

There is a pretty critical bug that completely breaks the site when trying to log out.

Code:
An exception occurred: [LogicException] Cannot manipulate data when the session is not started in src/XF/Session/Session.php on line 116

XF\Session\Session->__get() in src/addons/PB/DailyLogin/Listener.php at line 25
PB\DailyLogin\Listener::appPubComplete() in src/XF/Extension.php at line 86
XF\Extension->fire() in src/XF/App.php at line 3368
XF\App->fire() in src/XF/Pub/App.php at line 532
XF\Pub\App->complete() in src/XF/App.php at line 2829
XF\App->run() in src/XF.php at line 806
XF::runApp() in index.php at line

Just started happening today, and now it happens every time I log out.
 
@Painbaker

There is a pretty critical bug that completely breaks the site when trying to log out.

Code:
An exception occurred: [LogicException] Cannot manipulate data when the session is not started in src/XF/Session/Session.php on line 116

XF\Session\Session->__get() in src/addons/PB/DailyLogin/Listener.php at line 25
PB\DailyLogin\Listener::appPubComplete() in src/XF/Extension.php at line 86
XF\Extension->fire() in src/XF/App.php at line 3368
XF\App->fire() in src/XF/Pub/App.php at line 532
XF\Pub\App->complete() in src/XF/App.php at line 2829
XF\App->run() in src/XF.php at line 806
XF::runApp() in index.php at line

Just started happening today, and now it happens every time I log out.
I don't observe this on a clean XF setup
Do you have any add-ons installed for session caching or also track user logins and logouts, or a non-standard session storage configuration?

I uploaded a new add-on build that prevents code execution if the session has not been started. Please check if the issue persists.
 
I don't observe this on a clean XF setup
Do you have any add-ons installed for session caching or also track user logins and logouts, or a non-standard session storage configuration?

I uploaded a new add-on build that prevents code execution if the session has not been started. Please check if the issue persists.

I use the Cloudflare add-on by Digital Point if that matters. This started happening after installing.

Edit: Issue seems fixed after upgrading. I'll continue to monitor. Thanks!
 
Do you think you could add cumulative trophy support for Trophy Essentials?

 
Do you think you could add cumulative trophy support for Trophy Essentials?

I can take a look. Shoot me a DM if you're interested to fund this.
 
Screenshot 2025-07-03 at 16-15-02 altBoards.png

Hey, Painbaker, thanks for doing quick work on the work I commissioned. I noticed I wasn't getting daily login trophies, so I rebuilt the cumulative trophy points cache and I ended up getting daily, monthly, and yearly login streak trophies all at once.

This is my daily streak:

Screenshot 2025-07-03 at 16-18-40 Daily login streaks altBoards.png

I haven't been on a streak for a month yet. Not sure how your logic works, it might because the forum came online last month, so you're counting all the days it's been online in June. If that's the case that's fine.

But I shouldn't have gotten the yearly trophy.]

Also, get 14 server error logs when doing the rebuild.

Code:
    ErrorException: 4 src/XF/Error.php:81

    Generated by: Matthew Jul 3, 2025 at 4:14 PM

Stack trace

#0 src/XF.php(266): XF\Error->logError(4, false)
#1 src/addons/PB/DailyLogin/M2N/TrophyEssentials/Repository/CumulativeTrophy.php(37): XF::logError(4)
#2 src/addons/M2N/TrophyEssentials/Repository/CumulativeTrophy.php(62): PB\DailyLogin\M2N\TrophyEssentials\Repository\CumulativeTrophy->rebuildPbDailyLoginWeekStreak(Object(M2N\TrophyEssentials\Entity\CumulativeTrophy), Object(SV\DailyStatistics\XF\Entity\User), false)
#3 src/addons/M2N/TrophyEssentials/Job/CumulativeTrophyRebuild.php(109): M2N\TrophyEssentials\Repository\CumulativeTrophy->rebuildCumulativeTrophy(Object(M2N\TrophyEssentials\Entity\CumulativeTrophy), Object(SV\DailyStatistics\XF\Entity\User))
#4 src/addons/M2N/TrophyEssentials/Job/CumulativeTrophyRebuild.php(42): M2N\TrophyEssentials\Job\CumulativeTrophyRebuild->rebuildById(15)
#5 src/XF/Job/Manager.php(275): M2N\TrophyEssentials\Job\CumulativeTrophyRebuild->run(8)
#6 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#7 src/XF/Job/Manager.php(121): XF\Job\Manager->runJobEntry(Array, 8)
#8 src/XF/Admin/Controller/ToolsController.php(146): XF\Job\Manager->runByIds(Array, 8)
#9 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#11 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#12 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#14 src/XF.php(806): XF\App->run()
#15 admin.php(15): XF::runApp('XF\\Admin\\App')
#16 {main}
 
Last edited:
Streak user cumulative trophies still won't show up on my side. And I keep getting server logs during rebuild.

View attachment 2798
The error indicates that the method cannot be called, but I have not observed this on my test setup and see no reason for it, except for a broken class extension chain or the use of a different version of the Trophy Essentials add-on where the method call avoids the XF Class Proxy.

Try re-uploading the both add-ons with "Overwrite existing files for add-on rebuilds / upgrades" option checked for add-on data rebuild.
 
Okay, I figured out what the problem is, sorry. There seems to be a conflict with wutime's Top Contributors of the Month add-on:

Code:
src/XF.php(266): XF\Error->logError('Unable to rebui...', false)
#1 src/addons/M2N/TrophyEssentials/Repository/CumulativeTrophy.php(66): XF::logError('Unable to rebui...')
#2 src/addons/M2N/TrophyEssentials/Job/CumulativeTrophyRebuild.php(109): M2N\TrophyEssentials\Repository\CumulativeTrophy->rebuildCumulativeTrophy(Object(Wutime\TopContributors\Entity\CumulativeTrophy), Object(SV\DailyStatistics\XF\Entity\User))
#3 src/addons/M2N/TrophyEssentials/Job/CumulativeTrophyRebuild.php(42): M2N\TrophyEssentials\Job\CumulativeTrophyRebuild->rebuildById(20)
#4 src/XF/Job/Manager.php(275): M2N\TrophyEssentials\Job\CumulativeTrophyRebuild->run(8)
#5 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#6 src/XF/Job/Manager.php(121): XF\Job\Manager->runJobEntry(Array, 8)
#7 src/XF/Admin/Controller/ToolsController.php(146): XF\Job\Manager->runByIds(Array, 8)
#8 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Analytics\XF\Admin\Controller\Tools), NULL)
#10 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Analytics\XF\Admin\Controller\Tools), NULL)
#11 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(2824): XF\Mvc\Dispatcher->run()
#13 src/XF.php(806): XF\App->run()
#14 admin.php(15): XF::runApp('XF\\Admin\\App')
#15 {main}

Disabled, and rebuild went perfectly. I can inform him if you need, or whatever you think the next step to get this conflict fixed.
 
Back
Top