[OzzModz] Badges

[OzzModz] Badges 2.3.6 Beta 1

No permission to download
Hey @Ozzy47 @Painbaker

Attempted a fresh install of @Bob 's showcase addon and got this in the admin dashboard. I've previously installed showcase without errors (before badges were around). Help on a postcard please. :) The installation fails to complete.


  • Error: Call to protected method XF\AddOn\AbstractSetup::schemaManager() from scope OzzModz\ContentBadges\Listener
  • src/addons/OzzModz/ContentBadges/Listener.php:61
  • Generated by
  • Nov 8, 2023 at 6:29 PM

Stack trace​

#0 src/XF/Extension.php(49): OzzModz\ContentBadges\Listener::addonPostInstall(Object(XF\AddOn\AddOn), Object(XF\Entity\AddOn), Array, Array)
#1 src/XF.php(966): XF\Extension->fire('addon_post_inst...', Array, 'XenAddons/Showc...')
#2 src/XF/AddOn/AddOn.php(552): XF::fire('addon_post_inst...', Array, 'XenAddons/Showc...')
#3 src/XF/Job/AddOnInstallBatch.php(384): XF\AddOn\AddOn->postInstall(Array)
#4 src/XF/Job/AddOnInstallBatch.php(99): XF\Job\AddOnInstallBatch->stepFinalize(Object(XF\Timer))
#5 src/XF/Job/Manager.php(260): XF\Job\AddOnInstallBatch->run(8)
#6 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#7 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 8)
#8 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
#9 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(259): 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(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#12 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#14 src/XF.php(524): XF\App->run()
#15 admin.php(13): XF::runApp('XF\\Admin\\App')
#16 {main}

Request state​

array(4) {
["url"] => string(24) "/admin.php?tools/run-job"
["referrer"] => string(58) "https://mysite.com/admin.php?tools/run-job"
["_GET"] => array(1) {
["tools/run-job"] => string(0) ""
}
["_POST"] => array(3) {
["_xfRedirect"] => string(95) "https://mysite.com/admin.php?add-ons/install-from-archive-complete&batch_id=239"
["_xfToken"] => string(8) "********"
["only_ids"] => string(8) "12983708"
}
}
Hey bud. Just so you know, part of your code exposes your admin cp location etc.

Generated by: Nik

That part.
 
Last edited:
Bug?

I've got a badge to award if the username contains "MentaL". Upon testing, a member of staff has inserted mental to his name, but the badge is not awarded. I've forced the cron and everything. Unsure if its a bug or not as intended to be used in this way.
 
1699719600453.webp

user is showing badge twice. I have:
  • Rebuilt user badges
  • Rebuilt user badge cache
  • Recalculated badge count

but it's still showing 2 times
 
revoke/recall doesn't seem to work either. How odd.

Example 1

nolimitmu2 is not a member of the group anymore that gets the badge yet it cannot be force recalled even when forcing a cache rebuild.
 
Anyone know how we can expose the variables for this addon in different templates. It seems to be available only on a few templates.
 
revoke/recall doesn't seem to work either. How odd.

Example 1

nolimitmu2 is not a member of the group anymore that gets the badge yet it cannot be force recalled even when forcing a cache rebuild.
I think the persons need to login to trigger. Anyway to bypass ?
 
Is it just me or does this cause the Facebook image preview for links to be set to one of the badges even when there is a set metadata image for the style and an image attached to a thread?
 
I'm still on CMTV in one of my boards, how would I update to OzzModz? Just disable CMTV and activate OzzModz?

Edit: Figured it out. I had to install and migrate to VersoBit first. Then I could move and use the importer from OzzModz.
 
Last edited:
Where can i change the number of badges displayed under the postbit username? It shows only 4 while that member has 5 badges
 
Ozzy47 updated [OzzModz] Badges with a new update entry:

[OzzModz] Badges for XenForo 2.2+ Update 2.3.4 Patch Level 2

Feature: added option to cache stacked counters and display them:

View attachment 296229
  • Added link to badges tab in member full profile stats block
  • Added option to limit max running user badge update jobs at the same time (that triggered by users)
  • Added option to limit award message max length
  • Added option to display award reason in featured badge list
  • Added option to disable stacking badges on member profile tab
  • Added HTML code icon type
  • Fix: use...

Read the rest of this update entry...
 
Hi @Ozzy47,

I have 7 of these staking badges assigned to my account, but the number only shows up when the badge is automatically featured. When I manually feature it, only shows as one. Could you please change this so it doesn't matter how it is featured and the number to be always visible?

Thanks in advance.
 

Attachments

  • badge.webp
    badge.webp
    2.2 KB · Views: 9
After this update, when I click on Logout I am getting a white page with this:

SCR-20240107-rypa.webp
----------------

Server error:
Code:
Server error log
LogicException: Cannot manipulate data when the session is not started src/XF/Session/Session.php:111
Generated by: SynoMan 7. Jan 2024 at 20:40
Stack trace
#0 src/XF/Pub/App.php(601): XF\Session\Session->__get('dismissedNotice...')
#1 src/XF/Pub/App.php(547): XF\Pub\App->getNoticeList(Array)
#2 src/XF/App.php(2285): XF\Pub\App->renderPageHtml('
    

<div class=...', Array, Object(XF\Mvc\Reply\Error), Object(XF\Mvc\Renderer\Html))
#3 src/XF/Mvc/Dispatcher.php(404): XF\App->renderPage('
    

<div class=...', Object(XF\Mvc\Reply\Error), Object(XF\Mvc\Renderer\Html))
#4 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\Error), 'html')
#5 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#6 src/XF.php(524): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}


Code:
Server error log
LogicException: Cannot manipulate data when the session is not started src/XF/Session/Session.php:111
Generated by: SynoMan 7. Jan 2024 at 20:34
Stack trace
#0 src/addons/OzzModz/Badges/Listener.php(240): XF\Session\Session->__get('ozzmodzBadgesCh...')
#1 src/XF.php(377): OzzModz\Badges\Listener::OzzModz\Badges\{closure}()
#2 src/XF/Mvc/Dispatcher.php(158): XF::triggerRunOnce(true)
#3 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#4 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#5 src/XF.php(524): XF\App->run()
#6 index.php(20): XF::runApp('XF\\Pub\\App')
#7 {main}


If the add-on is disabled it works fine.


Also a lot of these:
Code:
Server error log
InvalidArgumentException: Accessed unknown getter 'cached_badges' on XF:User[69] src/XF/Mvc/Entity/Entity.php:213
Generated by: Unknown account 7. Jan 2024 at 20:36
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(125): XF\Mvc\Entity\Entity->get('cached_badges')
#1 internal_data/code_cache/templates/l1/s2/public/ozzmodz_badges_featured_badges_macros.php(67): XF\Mvc\Entity\Entity->offsetGet('cached_badges')



I also noticed one template modification does not work on master style (unmodified):

SCR-20240107-rzmg.webp
 
After this update, when I click on Logout I am getting a white page with this:

SCR-20240107-rypa.webp
I can confirm that's also happening on my forum.
 

Attachments

  • server-errors.webp
    server-errors.webp
    63.9 KB · Views: 7
I can confirm that's also happening on my forum.

Me too.

1704660127077.webp

Code:
#0 src/addons/OzzModz/Badges/Listener.php(240): XF\Session\Session->__get('ozzmodzBadgesCh...')
#1 src/XF.php(377): OzzModz\Badges\Listener::OzzModz\Badges\{closure}()
#2 src/XF/Mvc/Dispatcher.php(158): XF::triggerRunOnce(true)
#3 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#4 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#5 src/XF.php(524): XF\App->run()
#6 index.php(20): XF::runApp('XF\\Pub\\App')
#7 {main}
 
Top Bottom