1.2.2.2 Github version Testing

Discussion in 'Install/Upgrade Support' started by pani100, Jul 29, 2017.

  1. BabyDunk

    BabyDunk Active Member

    Joined:
    Feb 26, 2017
    Messages:
    279
    Likes Received:
    22
    Yes that's working a treat :D just goes to show i have a lot to learn. i try to stay away from isset as it produces a null on empty and have seen it break code and spent hours trying to figure to out why lol i always seem to opt'd for a ternary instead but that willl slow code immensely i presume . Thank you
     
  2. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,165
    Likes Received:
    251
    I have it but, haven't really toyed with it. It's on my back page. It got stuck in a loop when I tried to use the update when I went from an older version. That happened before and they fixed it in the Github version that came out last July. It got stuck in a loop on one of the steps.
     
  3. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    @david62311, I am working slowly on an installation script which progresses through with a fair bit of error reporting back so the user can understand what problems are occurring.
     
    BabyDunk likes this.
  4. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,165
    Likes Received:
    251
    I installed the latest Github version 5 minutes ago and marked so, I know it's a Github version so, now I should be able to help out now that I have a fresh copy and I know when I installed it because I also added the date there too.

    There was a bug on the register page. I see this appear at the top of the page.
    SELECT b.id FROM webid_banners b WHERE (b.views < b.purchased OR b.purchased = 0)

    OIC...someone left an echo in there on the includes/functions_banners.php page around line 80

    Remove this line of code:
    PHP:
    echo $query;
     
  5. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,165
    Likes Received:
    251
    My test sell item does not appear. I tried again and it showed ID 2 on the 2nd one. I checked the database and aha...the time set to sell in 4 hours from my time.

    capture-20170814-120909.png

    It shows this in the pending section from my user's account.

    capture-20170814-121542.png

    This is an old issue by the way and it's related to the UTC timezone. The people that are in that timezone most likely won't even notice a problem there. I was working on this issue last year and just put it off. I thought that one user knew what he was doing and I let him have a go at it. It might be fixed in the forum but, not on Github.

    I looked at my users timezone and it was set for being in London. I thought okay that might be a problem but, I switched it to my timezone and it's still the same issue. Nothing has changed. It's still submitting the sell item in UTC time. Here's a third item that I put up after I changed the timezone to my correct timezone. It is still 4 hours behind.

    capture-20170814-123232.png

    Renlok recently asked for help with the UTC on Github. I got an email message about it. @pani100 you've always been good with the time coding. I remember you fixed the daylight savings time. Have a look and see what it is.

    I will look around the forum for this fix and report back if I find something.
     
  6. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,165
    Likes Received:
    251
    I was just learning back then and things started to fly. I made this proposal that was not accepted to fix the sell page timezone issue. https://github.com/renlok/WeBid/pull/426/files You have to think it through. The site is already in UTC time. The users setting is converting the UTC time to match their timezone is already set in their user's control panel.

    This is why I thought this issue was already fixed because I made it 4 months ago. I didn't remember until just recently that I did make a proposal. I'm glad it's still there because I just used it again and it saved me some time.
     
  7. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    Hi david62311, I will have a look at the timezone again to see what is happening.
    Oops...That echo was probably me as the query was producing an error which I traced and fixed.
     
    david62311 likes this.
  8. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,165
    Likes Received:
    251
    @pani100 My thinking is it's already converted but, set to the user's timezone and then gets converted back to UTC time on the final sell submit. Everyone in that UTC timezone will not notice the difference but, I am in EST and I definitely notice it. Jump in the conversation on Github here https://github.com/renlok/WeBid/pull/426 if you think my proposal is right and let Renlok know if I am right so, I get credit for it please. All that UTC conversion stuff is already done in the includes/Date.php file. I don't even know why that convertToUTC was even thrown in there on the includes/function_sell.php page. I'm thinking about it and it doesn't make sense to me. Why would we want to INSERT a UTC time directly into the database unless we were actually in that timezone?

    Here's the latest: https://github.com/renlok/WeBid/blo...8b3a21fcb3ef2788e/includes/functions_sell.php to make sure you are looking at the newest page.

    This code here uses isset which I am pretty sure means if something is set there and I think it's set when the start now is checked on the sell.php page.
    PHP:
        $a_starts = (isset($_POST['a_starts'])) ? $dt->convertToDatetime($_POST['a_starts']) : $_SESSION['SELL_starts'];
        
    $duration = (isset($_POST['duration'])) ? $_POST['duration'] : $_SESSION['SELL_duration'];
        
    $a_ends = (isset($_POST['a_ends'])) ? $dt->convertToDatetime($_POST['a_ends']) : $_SESSION['SELL_ends'];
    The code towards the bottom on the page gets a query INSERT INTO the database like this:
    PHP:
    $params[] = array(':ends'$dt->convertToUTC($a_ends), 'str');
    $params[] = array(':starts'$dt->convertToUTC($a_starts), 'str');
    I see it converting more than once there for each line when they use $a_starts & $a_ends. The issue is it gets INSERT INTO the database converted to the UTC timezone and doesn't get reconverted to the user's timezone.
     
  9. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,165
    Likes Received:
    251
    Now I sort of understand what Renlok told me in the conversation in my proposal. It sounded like he intentionally wanted it to INSERT INTO the database as UTC time. If that is the case then there would have to be more coding added to offset the user's and admin's timezone as soon as the sell item was submitted. Otherwise it could put it into pending as it did with me in a different timezone.
     
  10. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    Hi Guys,
    I have decided to take a look at the updated github version to see what we can improve.
    Installation went very smooth and registering & creating auctions worked flawlessly.
    Problems I have found by just testing for a few hours:
    - Auctions completed (with the buy now option- not tested normal auctions ) do not show - just get a blank page - error 500.
    - "Pay now" for the item with blank options if the seller has not filled in any payment details -should there be a check/warning when creating an auction and selecting a payment option that has no information?

    If others are testing the github version lets see if we can iron out any problems we can find.
     
  11. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    Right once I have won an item, still logged in and going to view the item page throws this error
    HTML:
    Notice [8] Undefined variable: current_time on /home/....../item.php line 292
    Fatal error: Uncaught Error: Call to a member function diff() on null in /home/......./item.php:292 Stack trace: #0 {main} thrown in /home/....../item.php on line 292
    If I view the sold item page not logged in it has no error. These time zone alterations are causing a few issues. If I view the page logged in but not the winner is shows ok too. So something with the item page if you have won the item.
    Looking at the item page it looks like the $current_time is not declared before it is called so on line 292
    Find
    PHP:
    $difference $current_time->diff($end_time);
    and replace with
    PHP:
    $current_time = new DateTime('now'$dt->UTCtimezone);
            
    $end_time = new DateTime($ends$dt->UTCtimezone);
            
    $difference $current_time->diff($end_time);
    This seems to have sorted the item page not showing for now :)
     
  12. sprokkel

    sprokkel Active Member

    Joined:
    Apr 1, 2013
    Messages:
    162
    Likes Received:
    7
    1.2.2.2 testing
    until now I have 1 error,
    When i delete as user my auction, it stays in the category in the home page
    I try also as admin to clear the cache, no result
     
  13. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    Have you tried resync counters (last button on the page) on Admin Home page?
    That button resyncs the category count with the live auctions. Keep that in mind as I can't remember how often (or if it does) an automatic resync.
     
  14. sprokkel

    sprokkel Active Member

    Joined:
    Apr 1, 2013
    Messages:
    162
    Likes Received:
    7
    Hi Pany,
    No i didn't, just start a new installation of webid
    i downloaded webid WeBid-master from git.. is that the last version update ??
    i have import dbase, and language dutch, from my old webid 1.2.1
    now i have some
    { L_password } *
    { L_username } *
    where can i fix this errors
     
    Last edited: Jun 14, 2018
  15. pani100

    pani100 Well-Known Member

    Joined:
    May 9, 2011
    Messages:
    2,327
    Likes Received:
    449
    That is because the Language files have changed.
    If you open your language file language/../mesages.inc.php you will see you do not have a $MSG['password'] = 'Password'; etc.
    You will need to add these there. For admin errors i the language look inside language/../admin.inc.php
     
  16. sprokkel

    sprokkel Active Member

    Joined:
    Apr 1, 2013
    Messages:
    162
    Likes Received:
    7
    HI,
    i was only looking in mesages.inc.php,
    will lookto at /admin.inc.php
     
  17. DecoJr

    DecoJr New Member

    Joined:
    Dec 20, 2020
    Messages:
    4
    Likes Received:
    1
    Hi pani100. I am new to webid. Now is using 1.2.2.2 from github. Got many error since installation but slowly getting that fixed. Thanks to all of you, pani, nay, david, babydunk for your wonderful shares.

    I've try this fix and it's works for the items cannot be viewed from the winner's page. Thank you @pani100
     
  18. hungryfrank

    hungryfrank New Member

    Joined:
    May 25, 2021
    Messages:
    28
    Likes Received:
    9
    ok i am on php 7.3 or 7.4
    when i want to register it dose not enter the user in the db

    Code:
    $query = "INSERT INTO " . $DBPrefix . "users
                              (nick, password, hash, name, address, city, prov, country, zip, phone, nletter, email, birthdate,
                              suspended, language, balance, timezone)
                              VALUES
                              (:nick, :password, :hash, :name, :address, :city, :prov, :country, :zip, :phone, :nletter, :email, :birthdate,
                              :suspended, :language,  :balance, :timezone)";
                    $params = array(
                        array(':nick', $system->cleanvars($TPL_nick_hidden), 'str'),
                        array(':password', $phpass->HashPassword($TPL_password_hidden), 'str'),
                        array(':hash', $hash, 'str'),
                        array(':name', $system->cleanvars($TPL_name_hidden), 'str'),
                        array(':address', $system->cleanvars((isset($_POST['TPL_address'])) ? $_POST['TPL_address'] : ''), 'str'),
                        array(':city', $system->cleanvars((isset($_POST['TPL_city'])) ? $_POST['TPL_city'] : ''), 'str'),
                        array(':prov', $system->cleanvars((isset($_POST['TPL_prov'])) ? $_POST['TPL_prov'] : ''), 'str'),
                        array(':country', $system->cleanvars((isset($_POST['TPL_country'])) ? $_POST['TPL_country'] : ''), 'str'),
                        array(':zip', $system->cleanvars((isset($_POST['TPL_zip'])) ? $_POST['TPL_zip'] : ''), 'str'),
                        array(':phone', $system->cleanvars((isset($_POST['TPL_phone'])) ? $_POST['TPL_phone'] : ''), 'str'),
                        array(':nletter', intval($_POST['TPL_nletter']), 'int'),
                        array(':email', $system->cleanvars($_POST['TPL_email']), 'str'),
                        array(':birthdate', ((!empty($DATE)) ? $DATE : 0), 'str'),
                        array(':suspended', $SUSPENDED, 'int'),
                        array(':language', $language, 'str'),
                      //  array(':groups', implode(',', $groups), 'str'),
                        array(':balance', $balance, 'float'),
                        array(':timezone', $_POST['TPL_timezone'], 'str'),
                    );
    i


    when i take the groups out it works but ofcourse i can not sell, because no group is in the db
    i hope someone can help
     
  19. hungryfrank

    hungryfrank New Member

    Joined:
    May 25, 2021
    Messages:
    28
    Likes Received:
    9
    if some one can at least tell me what has to go in the db so i can continue with other things
     
  20. Nootkan

    Nootkan New Member

    Joined:
    Sep 7, 2018
    Messages:
    27
    Likes Received:
    0
    Sorry wish I could help however I am still using the 1.21 version as it is the stable one. I tried 1.22 but it was so buggy I gave up on it. Good Luck and I hope you are able to resolve your issues.
     

Share This Page