[development] Finding logic flaw in wishlist module

Tony Yarusso tonyyarusso at gmail.com
Fri Dec 12 08:29:32 UTC 2008


As background, I'm attempting to modify the wishlist module
(http://drupal.org/project/wishlist) to allow anonymous users to claim
gifts for purchase.  While I have most of it figured out, I think I
found a bug lurking somewhere else (which may be why this was disabled
originally).  Here's what happens:

When an anonymous user views the wishlist in list view, they will see
the "Get this gift" link regardless of its purchase status.
Authenticated users will properly get either "Get this gift" or "none
left to purchase".

For either type of user, on the full node view of the gift in question
they will see the correct numbers for "number requested" and "number
purchased", and other things on that page will properly reflect its
status.

I think I've narrowed down which section of code is responsible for
the generation of that link in the "action" column of the list, and
have provided it along with the working code from the node view for
comparison at http://drupalbin.com/4455.  However, my PHP skills are
terribly lacking, so when things get nested that far I just get
totally lost, so what I'm hoping is that someone else can look at
what's going on there and spot the problem.

-- 
Tony Yarusso
http://tonyyarusso.com/


More information about the development mailing list