Revoke not working

Flying Drupalist - November 30, 2008 - 22:21
Project:Award
Version:6.x-1.0
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

Clicking revoke sends me to a confirmation page. Click revoke again the confirm page refresh, and keeps refreshing no matter how many times I click it. It doesn't actually revoke.

Please help.

#1

HS - December 6, 2008 - 18:00
Category:support request» bug report
Priority:normal» critical

Yup revoke is not working. If one clicks confirm at the confirmation page, where it asks are you sure you want to revoke the award, nothing happens. the same page keeps loading asking for confirmation over and over.

#2

Bananoide - January 4, 2009 - 16:23

I subscribe the same problem. And one more (see #341770 )

#3

sugardave - March 27, 2009 - 22:48

I found the same issue. I believe I have fixed it, but I don't know how to make/submit a patch. Here is what you have to do:

In award.module, find the line (about 261):

function award_revoke_confirm_submit($form_id, $values) {

and change it to:

function award_revoke_confirm_submit($form, &$form_state) {

Next, for the if, I changed from:

if ($values['confirm'] && $grant = award_get_grant($values['aid'])) {

to:

if (!empty($form_state['values']) && $grant = award_get_grant($form_state['values']['aid'])) {

Finally, change:

award_revoke($values['aid']);

to:

award_revoke($form_state['values']['aid']);

I've only REALLY started getting into Drupal now that were at 6.x level, but I think this is how forms used to be handled in 5.x.

 
 

Drupal is a registered trademark of Dries Buytaert.