WeBid Bug Tracking

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000437WeBidAuctionspublic2013-06-22 18:002013-10-28 17:37
Assigned To 
PrioritynoneSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Product Version1.1.0 
Target VersionFixed in Version1.1.1 
Summary0000437: Cannot start auction in the future.
DescriptionDear all,

Update from 1.0.6, everything looks good but I`m unable to start auction in the future. I can set starting data for example 2014... but auction will start anyway immediately. Can you please help guys ?

Thank u in advance ;)
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
DrJ (reporter)
2013-06-23 12:32
edited on: 1970-01-01 00:00

I am also able to reproduce this issue. There was no problem in v1.0.6 but even with a fresh install of v1.1.0, I am unable to start an auction at a future date. Another minor issue associated with this is that I am in the U.S. While I am able to set the date format for most of the site, when a future start date is chosen from the calender, it appears in the box as d/m/y format instead of m/d/y which I have changed in the rest of the site.
linux4me (reporter)
2013-06-23 18:40
edited on: 1970-01-01 00:00

There are two things you should try to fix this.

First, the calendar issue. The problem there lies in the file js/calendar.php. The code doesn't take into account your setting in Admin for U.S. date format. To fix it, find the date generating code on line 66 and replace it with this:
// date generating function 
if ($system->SETTINGS['datesformat'] == 'USA')
    echo 'function f_tcalGenerDate (d_date) {
            return (
                (d_date.getMonth() < 9 ? \'0\' : \'\') + (d_date.getMonth() + 1) + "-"
                + (d_date.getDate() < 10 ? \'0\' : \'\') + d_date.getDate() + "-"
                + d_date.getFullYear()
    echo 'function f_tcalGenerDate (d_date) {
            return (
                (d_date.getDate() < 10 ? \'0\' : \'\') + d_date.getDate() + "-"
                + (d_date.getMonth() < 9 ? \'0\' : \'\') + (d_date.getMonth() + 1) + "-"
                + d_date.getFullYear()

The issue with not being able to set an auction in the future looks like it comes from line 440 in sell.php:
'STARTDATE' => (empty($start_now)) ? FormatDate($a_starts) : FormatDate($system->ctime),

You can see in that line of code that if $start_now is not empty, it defaults to setting the start time to the system time; i.e., immediately. To fix it, find line 77 in includes/functions_sell.php and comment it out so it looks like this:
//$start_now = (isset($_SESSION['SELL_start_now']) && (!isset($_POST['action']) || $_POST['action'] != 2)) ? $_SESSION['SELL_start_now'] : $start_now;

What that will do is allow $start_now to only be set when a value is posted creating, confirming, and editing an auction.

I have only tested it a couple of times, but it seems to fix the problem.
cooter (viewer)
2013-06-24 14:07
edited on: 1970-01-01 00:00

The calendar fix worked for me. However the fix for starting in the future kinda worked. I was now able to start the auction in the future. However now, if I select start now the auction starts at whatever time is specified in the starts in the future box.
DrJ (reporter)
2013-06-24 15:48
edited on: 1970-01-01 00:00


Thanks for the great fixes. The calender functionality has been fixed. The future start issue now seems to have the correct functionality also. In my limited testing I have only found one minor issue. If a seller is in the process of creating an auction, and they notice today's date and time in the future box, and they do not remember to select "Start Auction Now", there can be an error when they submit there information. If their computer's time has advanced to the next minute, user will get an error message stating "The start date cannot be in the past." when submitting the item for auction. This is a very minor issue but might cause some confusion.
linux4me (reporter)
2013-06-27 19:09
edited on: 1970-01-01 00:00

Sorry about that. I think I have a fix that works this time.

First find both these lines in the original includes/functions_sell/php on about line 76:
$start_now = (isset($_POST['start_now'])) ? $_POST['start_now'] : '';
    $start_now = (isset($_SESSION['SELL_start_now']) && (!isset($_POST['action']) || $_POST['action'] != 2)) ? $_SESSION['SELL_start_now'] : $start_now;

Replace them both with this, which includes the original lines commented out:
//$start_now = (isset($_POST['start_now'])) ? $_POST['start_now'] : '';
    //$start_now = (isset($_SESSION['SELL_start_now']) && (!isset($_POST['action']) || $_POST['action'] != 2)) ? $_SESSION['SELL_start_now'] : $start_now;
    // This is a more reliable test for whether the form is posted.
    If (isset($_POST['a_starts'])) {
        if (isset($_POST['start_now'])) {
            $start_now = 1;
        } else {
            $start_now = 0;
    } else {
        $start_now = $_SESSION['SELL_start_now'];

What that does is use a more accurate test to see if the form is posted, rather than just posted with the start_now field unchecked.

Before testing this, make sure you log out any current user to clear your session variables and do a fresh log in.
cooter (viewer)
2013-07-03 12:25
edited on: 1970-01-01 00:00

Thanks a ton, that second fix resolved my starts now issue.
DrJ (reporter)
2013-07-07 18:02
edited on: 1970-01-01 00:00

I believe you have addressed all issues. Well done.
Bushstar (viewer)
2013-10-20 11:53
edited on: 1970-01-01 00:00

Thanks linux4me. Your fix works.

This bug was reported to me this morning and as reported users were unable to start an auction in the future. The fix above seems to work well.

I have made a pull request for this bug fix on GitHub which can be committed if we deem this fix correct. I will report any errors that I find but the fix works for me.

https://github.com/renlok/WeBid/pull/2[/url] [^]
bgrantland (reporter)
2013-10-21 22:46
edited on: 1970-01-01 00:00

This fix worked for me as well. Thanks!

- Issue History
Date Modified Username Field Change
2015-04-01 13:17 renlok New Issue
2015-04-01 13:17 renlok import_id => 439
2015-04-01 13:17 renlok Date Submitted 2015-04-01 13:17 => 2013-06-22 18:00
2015-04-01 13:17 renlok Last Update 2015-04-01 13:17 => 2013-10-28 17:37

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker