How to resolve error on my badges page?

If you see an "Exception - count(): Argument #1 ($value) must be of type Countable|array, stdClass given" error when accessing your profile or badges page on Moodle, then its possible that one of the badges in your backpack is causing this error.

To resolve this error:

  1. Log in to your backpack account.
  2. Remove all the badges from the public collection that is connected to your Moodle profile.
  3. Log in to Moodle and visit your profile or badges page.
  4. Confirm that you do not see any errors now.
  5. Then in your backpack account, add one badge to your public collection that is connected to your Moodle profile.
  6. Check your Moodle profile to see the badge displays without any errors.
  7. Repeat steps 5 and 6 for each badge.
  8. If a badge causes an error, remove it from the public collection.


» Frequently Asked Questions