Open gyststarblayze opened 11 years ago
I did not see this thread (should have looked first) but I am having the exact same problem.
I am totally have the same problem too! It always pulls up the most recent badge uploaded. It ignores that you have requested a different one.
Anybody know a solution?
Thanks!!!
Hi all! I have the exact same problem. Bug is in the file /wpbadger/includes/awards_json.php in WP_Query arguments. Author lookups badge by the $title and $version and it doesn't work right.
My solution is replace code (/wpbadger/includes/awards_json.php):
$badge_query = new WP_Query(array( 'post_status' => 'publish', 'post_type' => 'badge', 'post_title' => $title, 'meta_query' => array( array( 'key' => 'wpbadger-badge-version', 'value' => $version, 'compare' => '=', 'type' => 'CHAR' ) ) ) );
by this code (/wpbadger/includes/awards_json.php):
$badge_query = new WP_Query(array( 'p' => $chosen_badge_id, 'post_type' => 'any' ) );
Enjoy!
@jiripavlicek Wow, that worked like a charm. Absolutely beautiful. Thanks!!
I'm having the same problem - but if I apply @jiripavlicek's fix I get:
"We have encountered the following problem: Could not parse the undefined file at undefined file"
from Mozilla Backpack.
This may have been an unrelated issue where HTML in the badge description of the one I wanted to award was throwing this error. Not totally sure.
Hello, i found out during testing that the wrong badge is awarded, when the Badges have the same Description. Always the newest with the same Description is taken as Criteria. I don't know if this should be, its a little bit annoying. Also its annoying that the "Choose Badge" List in the Awarding Section only shows the last 10! i really need many Badges in my Backpack for Testing......
@jiripavlicek Thanks--worked for me also.
I'm having a strange error where the incorrect badge is being awarded. Twenty days ago (Feb 2) I issued a badge and everything worked properly. Then, today (Feb 22) I issued a badge and things started acting strangely. Specifically:
I've tested this using several different badges and several different recipients. Each time the same incorrect badge is displayed. Incidentally, the incorrect badge is the badge I created most recently, which also happens to the be the last in alphabetical order (I suspect the timing matters more than the alphabetical order).
I did not update Wordpress or any plugins during the past twenty days, so I'm stumped. Any thoughts?