subscriptionid field not in userban table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raywjohnson
    Member
    • Apr 2007
    • 99
    • 5.3.x

    [Bug / Issue] subscriptionid field not in userban table

    Greetings,

    Error logged when the following Scheduled Task (CRON) ./core/includes/cron/subscriptions.php

    I check the table and the install script, no "subscriptionid" field in "userban" table.

    #7 vB_dB_Assertor->update() called in [path]/includes/class_paid_subscription.php on line 578
    Is in ./core/includes/class_paid_subscription.php line 578

    PHP Code:
    vB::getDbAssertor()->update('userban'$userbansql, array('subscriptionid' => $subscriptionid'userid' => $user['userid'])); 
    Is this a bug? Or is something broken on my install?

    The Error...
    Code:
                Invalid SQL:
    UPDATE userban SET `customtitle`=0,`usertitle`='Registered'
     WHERE (`subscriptionid` = 1 AND `userid` = 6841)
    /**userban- crontab_script**/;
    
                MySQL Error   : Unknown column 'subscriptionid' in 'where clause'
                Error Number  : 1054
                Request Date  : Saturday, July 15th 2017 @ 09:00:41 AM
                Error Date    : Saturday, July 15th 2017 @ 09:01:15 AM
                Referrer      :
                IP Address    :
                Username      : Guest
                Classname     : vB_Database_MySQLi
                MySQL Version :
    
    
    Stack Trace:
    #0 vB_Database->getErrorData() called in [path]/vb/database.php on line 1188
    #1 vB_Database->halt() called in [path]/vb/database/mysqli.php on line 201
    #2 vB_Database_MySQLi->execute_query() called in [path]/vb/database.php on line 542
    #3 vB_Database->query_write() called in [path]/vb/db/query/update.php on line 115
    #4 vB_dB_Query_Update->doUpdates() called in [path]/vb/db/query/update.php on line 101
    #5 vB_dB_Query_Update->execSQL() called in [path]/vb/db/assertor.php on line 302
    #6 vB_dB_Assertor->assertQuery() called in [path]/vb/db/assertor.php on line 537
    #7 vB_dB_Assertor->update() called in [path]/includes/class_paid_subscription.php on line 578
    #8 vB_PaidSubscription->delete_user_subscription() called in [path]/includes/cron/subscriptions.php on line 42
    #9 include_once([path]/includes/cron/subscriptions.php) called in /srv/www/pit_scripts/cron.php on line 32
    Last edited by raywjohnson; Mon 17 Jul '17, 4:16pm. Reason: corrected line #587 to #578 (dyslexia, sorry!)
  • raywjohnson
    Member
    • Apr 2007
    • 99
    • 5.3.x

    #2
    Confirmed no error if I change this:

    PHP Code:
    vB::getDbAssertor()->update('userban'$userbansql, array('subscriptionid' => $subscriptionid'userid' => $user['userid'])); 

    to this

    PHP Code:
    vB::getDbAssertor()->update('userban'$userbansql, array('userid' => $user['userid'])); 

    Comment

    • Trevor Hannant
      vBulletin Support
      • Aug 2002
      • 24325
      • 5.7.X

      #3
      What version of vB5 are you running?
      Vote for:

      - Admin Settable Paid Subscription Reminder Timeframe (vB6)
      - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

      Comment

      • raywjohnson
        Member
        • Apr 2007
        • 99
        • 5.3.x

        #4
        Oops. Forgot include that.

        Version 5.3.1

        Comment

        • Trevor Hannant
          vBulletin Support
          • Aug 2002
          • 24325
          • 5.7.X

          #5
          There shouldn't be a 'subscriptionid' column in that table. In fact, taking a look at a vB4 database, that column didn't exist in that version's 'userban' table either!

          Do you have any add-ons installed within vBulletin? Have you any old add-on files from before an upgrade to vB5 (if you upgraded from a previous version)?
          Vote for:

          - Admin Settable Paid Subscription Reminder Timeframe (vB6)
          - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

          Comment

          • raywjohnson
            Member
            • Apr 2007
            • 99
            • 5.3.x

            #6
            Only a few plugins. I checked them all out first. I even disabled them all and tested. Same result.

            The problem code is in a core vB file: ./core/includes/class_paid_subscription.php at line 578

            Line 578: vB::getDbAssertor()->update('userban', $userbansql, array('subscriptionid' => $subscriptionid, 'userid' => $user['userid']));

            I double checked the files from the install zip file to make sure this was not some hacked in change. I rarely if ever hack core files. Bad juju...

            But could have been the previous developer for the forum.

            PS: I went all dyslexia on the line number in my original post (587, I meant 578).

            Comment

            • Wayne Luke
              vBulletin Technical Support Lead
              • Aug 2000
              • 73979

              #7
              Do you let banned users purchase subscriptions? That is the only time this could occur.

              Anyway, that field shouldn't be included as it isn't necessary to reinstate a ban. Please open a JIRA here: http://tracker.vbulletin.com/secure/...91&issuetype=1
              Translations provided by Google.

              Wayne Luke
              The Rabid Badger - a vBulletin Cloud demonstration site.
              vBulletin 5 API

              Comment

              Related Topics

              Collapse

              Working...