Jump to:
| Project: | Ubercart Auction |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi Garrett
I upgraded to the newest dev version a couple of days ago. Now I cannot create or edit auctions anymore.
Creating a new auction on product creation (New product, new auction):
When I try to set a product up for auction with the standard "+7 days" timeframe, The auction immediately displays as ended 39 years ago, which I think is the time of the unix timestamps start value.
Updating an auction on an existing product (Existing product, existing auction:
My changes doesn't get saved, and I can't remove the auction by unchecking the "This is an auctioned product" checkbox.
Creating a a new auction on an existing product (Existing product, new auction):
This is not possible. Nothing is created. I checked the hook_nodeapi "update" op in the uc_auction module file, and here there's seemingly no code for inserting a new auction record in the db.
Could you have made some changes to the hook_nodeapi function that has made everything not work?
Comments
#1
The first issue sounds like a PHP version issue. Older versions of PHP couldn't parse as wide a range of relative date formats, and returned -1 (December 31, 1969, 23:59:59) when it couldn't parse something.
As for the other two issues; sorry, I couldn't replicate the behavior. Can anyone else?
The code in hook_nodeapi() which saves details for previously-existing products which are becoming auctioned products is in lines 523-537 of the most recent dev release. Specifically, line 536,
drupal_write_record('uc_auction', $record);, is the line which inserts the data into the database - many Drupal devs aren't yet aware of drupal_write_record() and are still using db_query() to insert or update stuff in the database, which is a shame because drupal_write_record() is waeome.#2
But it worked fine until now. So it can't be the PHP version.
You're right about the code being there. I guess I should've gone to sleep a little bit earlier last night, sorry! ;)
Since you can't replicate the problem yourself, I'm going to try to find the cause of the error and return here with the result. But so you haven't made any changes to the hook_nodeapi within the last month or so?
#3
I honestly couldn't tell you off the top of my head where all the changes of the past month have been. I find it quite strange that all these things have suddenly stopped working, though, especially since nobody else has reported similar problems.
Have you tried completely uninstalling the module (use the "Uninstall" tab on the module list page) and reinstalling it? A fresh start might give it the kick in the pants it needs.
#4
Hi Garrett
I'm really sorry to have bothered you about this! It turns out that UC Auction has nothing to do with this. Instead it was an error in my own module that prevented the 'validate' op of hook_nodeapi to fire. Since UC Aucion uses this op to get the values for the auction, of course nothing was inserted. :S