[Elgg 1.8-1.12 & 2.X: Elggx Badges] v2.3.3

Release Notes

  • Minimum Elgg version required is now Elgg 2.3.0,
  • If Elggx Userpoints plugin is used, minimum version required is 2.3.2,
  • Major code rewrite to be inline with Elgg 2.3 coding style and functions,
  • Badge image location moved from uploading user's data directory subfolder to subfolder of site entity (see README.md for upgrate instructions).
  • how to delete badges ? 

    It says me "Error: entity to delete is not a badge entity"

    why I cannot delete it ?


    ps. for upload images of badges , it needs a particular format or it's the same if upload Jpg or Png o Ico or other formats ? 


  • Does the deletion fail for all badges (you could also try with adding a new badge just to test if deletion works for it or not)? I can't reproduce it with version 2.3.3, i.e. deletion works fine for me.

    PNG and JPG images should both work fine to be used as badges.

  • Where can i found the directory where had been saved the badges i want to delete ? 

  • The badge images are saved in the data directory in the subfolder of the site entity (most likely the path is path/to/data_directory/1/1/elggx_badges/). But just deleting the images is not a good idea because you would still have the corresponding badge entity in your database but now without the image and this would result in an image file not found error.

    So, can you answer the questions I had in my last posting? The deletion works fine for me when testing, so I wonder why it fails for you. The error message would only appear if the guid send to the delete action would belong to an entity that is not a badge. If the error still occurs with the entity being a badge I wonder if you may have made something wrong in installing the Badges plugin. Had you an older version installed before and updated or have you started with the latest version? And error in the log added when enabling the plugin?

    If you would comment out the lines

    if (!$badge instanceof BadgesBadge) {
        return elgg_error_response(elgg_echo('badges:delete_fail_no_badge'));

    in mod/elggx_badges/actions/delete.php you would disable the check for the subtype of the entity. But if the guid is wrong (for whatever reason) you might delete something else by mistake then. So, I would really suggest you try to figure out what might be wrong in your installation first to be able to safely delete the badge and its files then (with any more info I might be able to provide better feedback what might cause the error to appear).


  • Category: Misc
  • License: GNU General Public License (GPL) version 2
  • Updated: 2018-6-2
  • Downloads: 6161
  • Recommendations: 27

Other Projects

View iionly's plugins