HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Editing badges problem

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 Ex-Fanboy Munich Admin

    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!

  • R_JR_J Ex-Fanboy Munich Admin

    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.

  • Thanks RJ, but i found a sollution. After testing many things from another postings on this problem, i discovered one witch worke. Tested it twice, from diffrent computers and it works 100%. It's the sollution 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;
        }
      }
    
Sign In or Register to comment.