[resolved] Changing Achievement Type name wipes out badges (5 posts)

  1. oddmonster
    Posted 2 years ago #

    Anyone else having this happen?

    I created a new Achievement Type, wrote six badges for it, went back in and changed the name of the Achievement Type and immediately lost all six badges. Is this a known issue?

    I was able to replicate it happening on two different installations.


  2. Michael Beckwith
    Posted 2 years ago #

    This is technically not a *bug* but it is a limitation that trickles back into WordPress core. We use Custom Post Types for achievements, and when you rename a slug of a Post Type after you've created some, the values in the database don't also get updated. So the achievements you've made aren't lost, they just no longer match the slugs in the database.

    We don't presently have a way to keep this coordinated with BadgeOS but should probably be considered in a future release. I'm seeing achievement renaming come up more often lately.

    The only solution I can think of right now is manual updating in the database for the posts in question.

  3. Michael Beckwith
    Posted 2 years ago #

    We have added the ability to migrate between achievement names including updating all of the available achievements AND already awarded achievements to the user in 1.4.0

    Check the 1.4.0 changelog to see everything new that's been added with this latest version.

  4. aapollo
    Posted 1 year ago #

    This is still not working in 1.4.3.

    I've tested and had all my badges wiped out on each test.


  5. Michael Beckwith
    Posted 1 year ago #

    Just to be clear, the post type was switched, but the data was never actually lost.

    aapollo, if you can and would be so kind, could you help confirm a hopeful fix in this branch of the plugin? https://github.com/opencredit/badgeos/archive/renaming-fix.zip

    I don't know if you have a dev site set up that could help confirm the fix, or if it'd all be on a live site.

    You'll want to deactivate the core plugin first, before activating this one, to help prevent duplicate function errors.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BadgeOS
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic