Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Update for critical security issue in PHPMailer included in release Vanilla 2.3.1

Editing badges problem

This discussion is related to the Yet Another Gamification Application addon.

Hey guys, maybe u could help me with this. In YAGA 1.1, i renamed some of the reactions....turned awesome into like for example...but when i try to edit the awesome badges, so i can change the names there too, i get an error saying "Target is required.ActionID is required." Any idea how to fix this?

Comments

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    YAGA 1.1 is not compatible with Vanilla 2.3

    The current version from GitHub should work

  • Thanks RJ, but i found a solution. After testing many things from other postings regarding this problem, i discovered one which worked. Tested it twice, from different computers and it works 100%. It's the solution provided by @daemoncesar in another post...

    go in applications/yaga/controllers/class.badgecontroller.php
    find the code:

      // Find the rule criteria
      $FormValues = $this->Form->FormValues();     
      $Criteria = array();
      foreach($FormValues as $Key => $Value) {
        if(substr($Key, 0, 7) == '_Rules/') {
          $RealKey = substr($Key, 7);
          $Criteria[$RealKey] = $Value;
        }
      }
    

    and replace with this:

      // Find the rule criteria
      $FormValues = $this->Form->FormValues();            
      $Criteria = array();
      foreach($FormValues as $Key => $Value) {
        //if(substr($Key, 0, 7) == '_Rules/') {
          $Criteria[$Key] = $Value;
        //}
      }
    

    After you do this, you can edit badges as u like, no more "Target is required.ActionID is required." error. Hope this will help other people as well!

    vrijvlinder
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    This solves your problem but it is the wrong approach. I hope it will not "help" others because changing core files is not adviced because of several reasons, changing code without fully understanding what you do is, well, let's call it adventurous, denying a proper solution, provided by the developer of the software is ignorant.

    In this case you have chosen the quick and easy approach which might solve that problem but does not involve other fixes and enhancements.
    You can keep on patching code, but you really shouldn't do...

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @R_J said:
    This solves your problem but it is the wrong approach. I hope it will not "help" others because changing core files is not adviced

    He did not change core files, he changed files inside the YAGA application which is no longer being supported or updated.

Sign In or Register to comment.