Title: Possible error in nomination check code
Last modified: August 24, 2016

---

# Possible error in nomination check code

 *  Resolved [mbearss](https://wordpress.org/support/users/mbearss/)
 * (@mbearss)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/possible-error-in-nomination-check-code/)
 * We were having issues with the nomination system on the site. Users who have 
   submitted nominations for badges were unable to receive nominations for the same
   badge. I was able to fix the problem by modifying
    line 1009 of /includes/submission-
   actions.php
 *     ```
       // If nomination, modify our query to look for nominations by this user
       	if ( 'nomination' == $feedback_type ) {
       		unset( $args['author'] );
       		$args['meta_query'][] = array(
       			'key'   => '_badgeos_nomination_user_id', // change nominating to nomination
       			'value' => absint( $user_id )
       		);
       	}
       ```
   
 * [https://wordpress.org/plugins/badgeos/](https://wordpress.org/plugins/badgeos/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [10 years, 11 months ago](https://wordpress.org/support/topic/possible-error-in-nomination-check-code/#post-6176209)
 * Curious, because from the best I can tell, that line/function is meant for checking
   on feedback, not achievement status.
 *  Thread Starter [mbearss](https://wordpress.org/support/users/mbearss/)
 * (@mbearss)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/possible-error-in-nomination-check-code/#post-6176249)
 * In function badgeos_create_nomination() line 47
 * before the nomination is inserted
 * `if ( ! badgeos_check_if_user_has_nomination( absint( $user_nominated ), absint(
   $achievement_id ) ) ) {`
 * Following that call
 *     ```
       function badgeos_check_if_user_has_nomination( $user_id = 0, $achievement_id = 0 ) {
       	return badgeos_check_if_user_has_feedback( $user_id, $achievement_id, 'nomination' );
       }
       ```
   
 * It would seem from the function name that it would check feedback, but this check
   is causing the nomination to fail.
 *  [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [10 years, 11 months ago](https://wordpress.org/support/topic/possible-error-in-nomination-check-code/#post-6176261)
 * Have you noticed if this same behavior happens both during the process of the
   nomination, as well as after the nomination has been approved/denied? Wondering
   if it’s a temporary issue or a permanent one
 *  Thread Starter [mbearss](https://wordpress.org/support/users/mbearss/)
 * (@mbearss)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/possible-error-in-nomination-check-code/#post-6176298)
 * I have noticed the issue occurring when the nominations are pending, approved,
   or denied. The only way I can get a nomination to occur is by modifying the code,
   or deleting the row from _postmeta.
 *  [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [10 years, 11 months ago](https://wordpress.org/support/topic/possible-error-in-nomination-check-code/#post-6176313)
 * Not sure at this point, I’d need to confer with people to see if they can find
   any fault in the logic here.
 * Opened an issue about it on GitHub and copied over your replies here.
 * [https://github.com/opencredit/badgeos/issues/448](https://github.com/opencredit/badgeos/issues/448)
 *  [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [10 years, 8 months ago](https://wordpress.org/support/topic/possible-error-in-nomination-check-code/#post-6176427)
 * Marking resolved as it’s a known issue.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Possible error in nomination check code’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/badgeos_85d3bc.svg)
 * [BadgeOS](https://wordpress.org/plugins/badgeos/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/badgeos/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/badgeos/)
 * [Active Topics](https://wordpress.org/support/plugin/badgeos/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/badgeos/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/badgeos/reviews/)

## Tags

 * [Issues](https://wordpress.org/support/topic-tag/issues/)
 * [nomination](https://wordpress.org/support/topic-tag/nomination/)

 * 6 replies
 * 2 participants
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/possible-error-in-nomination-check-code/#post-6176427)
 * Status: resolved