[AP] Daily Goals

[AP] Daily Goals 2.5.0

No permission to download
apathy updated [AP] Daily Goals with a new update entry:

2.4.0

  • Many cleanups and improvements
  • Create style property for controlling color of text-shadow on widget percent text
  • Create style property for controlling strength of text-shadow on widget percent text
  • Use phrase groups for streak graph
  • Support [OzzModz] Post Comments
  • Create Siropu Shoutbox message goal
  • Create Siropu Chat message goal
  • Create DBTech Shop Item Purchase goal
  • Create GUI in Admin Panel -> Content -> "Manage goals"
  • Fix UBS / Blog widget using...

Read the rest of this update entry...
 
I am having a bit of an issue. This is the error I get when go to the Content settings.
Quick fix, Remove : string|array from the file src/addons/apathy/DailyGoal/Admin/Controller/Goal.php line 364
Change protected function formatType($contentType): string|array to this protected function formatType($contentType)
 
apathy updated [AP] Daily Goals with a new update entry:

2.4.1

  • Create cron job & respective admin option for deleting History items older than the specified amount
  • Add warning to "reset streak" button confirmation
  • Fix display_totals() in admin goal editor template
  • Reduce query count in admin panel goal editor
    • Use a left join on the Goal entity when fetching the goals history
    • Use phrase groups for "longest $contentType streak" phrases
  • Fix padding of pagenav in admin goal editor
  • Type hinting...

Read the rest of this update entry...
 
Hey Apathy. I updated the addon for the previous release, and half way through it failed and stated it couldn't be installed.

Now when I've tried to update the new (most recent build) hoping it would fix it, it still doesn't work. I've checked the rebuilt option, and that again - still didn't work.

I now don't have an option to uninstall, because I have a constant message at the top stating -

One or more add-ons currently have actions pending and may be in an inconsistent state. Because of this, some errors may be suppressed and unexpected behavior may occur. If this does not change shortly, please contact the add-on author for guidance.

When I look for the addon (which I've disabled) - It shows Action Pending. What do I do? No idea how to fix this and I love your addon!

This was also the error that popped up first in my logs -

Code:
ErrorException: Batch install error: [E_WARNING] Undefined array key "apDgDisableScGoal" src/addons/apathy/DailyGoal/Install/Upgrade2040070.php:210
Generated by: smooth-c Sep 10, 2022 at 8:57 PM
Stack trace
#0 src/addons/apathy/DailyGoal/Install/Upgrade2040070.php(210): XF::handlePhpError(2, '[E_WARNING] Und...', '/home/behindthe...', 210)
#1 src/addons/apathy/DailyGoal/Install/Upgrade2040070.php(102): apathy\DailyGoal\Setup->getAdminSetValues('Sc')
#2 src/addons/apathy/DailyGoal/Install/Upgrade2040070.php(77): apathy\DailyGoal\Setup->setupGoals()
#3 src/XF/AddOn/StepRunnerUpgradeTrait.php(124): apathy\DailyGoal\Setup->upgrade2040070Step1(Array)
#4 src/XF/AddOn/StepRunnerUpgradeTrait.php(73): apathy\DailyGoal\Setup->upgradeStepRunner(2040070, 1, Array, NULL)
#5 src/XF/Job/AddOnInstallBatch.php(299): apathy\DailyGoal\Setup->upgrade(Array)
#6 src/XF/Job/AddOnInstallBatch.php(91): XF\Job\AddOnInstallBatch->stepAction(Object(XF\Timer))
#7 src/XF/Job/Manager.php(260): XF\Job\AddOnInstallBatch->run(8)
#8 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#9 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 8)
#10 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
#11 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#12 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(Truonglv\ImageOptimizer\XF\Admin\Controller\Tools), NULL)
#13 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Truonglv\ImageOptimizer\XF\Admin\Controller\Tools), NULL)
#14 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#15 src/XF/App.php(2352): XF\Mvc\Dispatcher->run()
#16 src/XF.php(524): XF\App->run()
#17 admin.php(13): XF::runApp('XF\\Admin\\App')
#18 {main}
Request state
array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(55) "https://www.behind-the-mask.net/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(92) "https://www.behind-the-mask.net/admin.php?add-ons/install-from-archive-complete&batch_id=226"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(6) "130792"
  }
}

Thank you :)
 
Hey Apathy. I updated the addon for the previous release, and half way through it failed and stated it couldn't be installed.

Now when I've tried to update the new (most recent build) hoping it would fix it, it still doesn't work. I've checked the rebuilt option, and that again - still didn't work.

I now don't have an option to uninstall, because I have a constant message at the top stating -

One or more add-ons currently have actions pending and may be in an inconsistent state. Because of this, some errors may be suppressed and unexpected behavior may occur. If this does not change shortly, please contact the add-on author for guidance.

When I look for the addon (which I've disabled) - It shows Action Pending. What do I do? No idea how to fix this and I love your addon!

This was also the error that popped up first in my logs -

...

Thank you :)

Hey pal, sorry for causing the trouble, it would appear my heads just completely up my arse lately.

Thankfully this is a very easy fix, I've reproduced your scenario, made maybe 3 line changes, and afterwards I was able to upgrade easily. I'll push the update out shortly.
 
Hey pal, sorry for causing the trouble, it would appear my heads just completely up my arse lately.

Thankfully this is a very easy fix, I've reproduced your scenario, made maybe 3 line changes, and afterwards I was able to upgrade easily. I'll push the update out shortly.
Hey bud. No need to be sorry. I really appreciate it. I'll give it a go now.

:)
 
Hi @apathy

I am getting a daily server error related to this add-on:

"Attempted to convert NULL to integer [goal]
20 minutes ago src/XF/Mvc/Entity/Entity.php:765"

#0 src/XF/Mvc/Entity/Entity.php(643): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'goal', 2, Array)
#1 src/XF/Mvc/Entity/Entity.php(745): XF\Mvc\Entity\Entity->set('goal', NULL, Array)
#2 src/addons/apathy/DailyGoal/Repository/Goal.php(183): XF\Mvc\Entity\Entity->bulkSet(Array)
#3 src/addons/apathy/DailyGoal/Repository/Goal.php(160): apathy\DailyGoal\Repository\Goal->saveStatResult(1663545445, 'siropu_shoutbox...', 6, NULL, 1)
#4 src/addons/apathy/DailyGoal/Cron/Goal.php(81): apathy\DailyGoal\Repository\Goal->resetGoal(Object(apathy\DailyGoal\Entity\Goal))
#5 src/XF/Job/Cron.php(37): apathy\DailyGoal\Cron\Goal::resetCounterAtMidnight(Object(XF\Entity\CronEntry))
#6 src/XF/Job/Manager.php(260): XF\Job\Cron->run(8)
#7 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#8 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#9 job.php(43): XF\Job\Manager->runQueue(false, 8)
#10 {main}

-------------

Previous InvalidArgumentException: Attempted to convert NULL to integer - src/XF/Mvc/Entity/ValueFormatter.php:149
#0 src/XF/Mvc/Entity/Entity.php(761): XF\Mvc\Entity\ValueFormatter->castValueToType(NULL, 2, Array)
#1 src/XF/Mvc/Entity/Entity.php(643): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'goal', 2, Array)
#2 src/XF/Mvc/Entity/Entity.php(745): XF\Mvc\Entity\Entity->set('goal', NULL, Array)
#3 src/addons/apathy/DailyGoal/Repository/Goal.php(183): XF\Mvc\Entity\Entity->bulkSet(Array)
#4 src/addons/apathy/DailyGoal/Repository/Goal.php(160): apathy\DailyGoal\Repository\Goal->saveStatResult(1663545445, 'siropu_shoutbox...', 6, NULL, 1)
#5 src/addons/apathy/DailyGoal/Cron/Goal.php(81): apathy\DailyGoal\Repository\Goal->resetGoal(Object(apathy\DailyGoal\Entity\Goal))
#6 src/XF/Job/Cron.php(37): apathy\DailyGoal\Cron\Goal::resetCounterAtMidnight(Object(XF\Entity\CronEntry))
#7 src/XF/Job/Manager.php(260): XF\Job\Cron->run(8)
#8 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#9 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#10 job.php(43): XF\Job\Manager->runQueue(false, 8)
#11 {main}
 
Hi @apathy

I am getting a daily server error related to this add-on:
I can't seem to reproduce this, i'm assuming you actually have the shouts goal enabled right? It looks like it's failing because no value for was actually specified for the goal count itself, but it should be defaulting to 5 if there isn't - that also isn't goal specific, every goal should default to 5 if no value was specified.

I have an update planned to release maybe tomorrow with two noteworthy fixes that should at least help us solve your issue:
  • In certain circumstances the "minimum goal" value is ignored, and the goal count can drop to 0 (not NULL like your error is saying though)
  • Goals which were once created but were later disabled are hidden in the admin panel, and trying to create a new one returns the "A goal of this type already exists" message
So, possibly the first fix will solve your issue, but I'm not counting on it. The second fix will at least help us get more information about your setup, since if you were to check right now it may look like you never created a Shouts goal even if you previously did.
 
I can't seem to reproduce this, i'm assuming you actually have the shouts goal enabled right? It looks like it's failing because no value for was actually specified for the goal count itself, but it should be defaulting to 5 if there isn't - that also isn't goal specific, every goal should default to 5 if no value was specified.

I have an update planned to release maybe tomorrow with two noteworthy fixes that should at least help us solve your issue:
  • In certain circumstances the "minimum goal" value is ignored, and the goal count can drop to 0 (not NULL like your error is saying though)
  • Goals which were once created but were later disabled are hidden in the admin panel, and trying to create a new one returns the "A goal of this type already exists" message
So, possibly the first fix will solve your issue, but I'm not counting on it. The second fix will at least help us get more information about your setup, since if you were to check right now it may look like you never created a Shouts goal even if you previously did.

I have deleted the shout goal and upgraded to the latest version. Hopefully that fixes it. Thanks for your help!
 
Hello,

I've installed the modification but doesn't seem to load on my sidebar. Is there a particular setting I've overlooked?
 
Hello,

I've installed the modification but doesn't seem to load on my sidebar. Is there a particular setting I've overlooked?
Assuming you've set up at least one goal (Admin Panel -> Content -> Manage goals), it's likely a permission issue - make sure that the "View widget" and the relevant goals permission are set correctly
 
Assuming you've set up at least one goal (Admin Panel -> Content -> Manage goals), it's likely a permission issue - make sure that the "View widget" and the relevant goals permission are set correctly
Yes, that did the trick. Didn't think of the groups permissions. Thanks for the quick reply! And the great free add on of course.
 
Assuming you've set up at least one goal (Admin Panel -> Content -> Manage goals), it's likely a permission issue - make sure that the "View widget" and the relevant goals permission are set correctly
Also, I have one more question for the timeframe. It is default set to 3, what 3? Hours, days ?
 
Top Bottom