1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Upgrading to 1.3.4

Discussion in 'Installation, Upgrade, and Import Support' started by Deebs, Jul 31, 2014.

  1. Deebs

    Deebs Well-Known Member

    Hi,

    I have just upgraded my forums to 1.3.4 using the CLI and it got as far as running step 19, upgrading to 1.3.0 Release Candidate 2. Then it rebuilt the data and finally the templates and stated that the upgrade was successful. No errors were displayed during the process.

    When I enter the AdminCP it states I am on 1.3.4 and if I goto /install it only offers the ability to rebuild the master data. Now I get the following errors in the Server Error Log:
    Code:
    Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Field 'ip_address_old' doesn't have a default value - library/Zend/Db/Statement/Mysqli.php:214
    Generated By: Unknown Account
    From searching the forums @Mike mentions that some steps possibly have not run. Unfortunately I cannot provide a copy of the installation output as my machine decided to have a reset just as I was copying the information.

    So, need I be worried that it never displayed that it was upgrading to 1.3.1, 1.3.2 and 1.3.4? (File health check reports all ok)
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    It may be that the column still exists in the database.

    Are you able to provide phpMyAdmin access so we can check the various tables?
     
  3. borbole

    borbole Well-Known Member

  4. Deebs

    Deebs Well-Known Member

    The column is still there, that is not my concern, just that the CLI did not mention any of the other versions during the upgrade. Unfortunately I do not have phpMyAdmin access installed, I can only offer a workbench style login over a SSH tunnel.
     
  5. Mike

    Mike XenForo Developer Staff Member

    The only versions that will be displayed are ones that have actual upgrade scripts for them, so that's expected.
     
    Deebs likes this.
  6. Deebs

    Deebs Well-Known Member

    Thanks @Mike, I will go ahead and drop the column.
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    There may be other steps required related to indexes.

    When I am back to my PC I'll be able to check.
     
    Deebs likes this.
  8. Mike

    Mike XenForo Developer Staff Member

    Notably:
    Code:
    ALTER TABLE xf_ip
                    DROP ip_old,
                    DROP KEY ip_log_date,
                    ADD KEY ip_log_date (ip, log_date)
     
    borbole and Brogan like this.
  9. Deebs

    Deebs Well-Known Member

    Actually @Brogan, not to worry, I am currently going through 1030010-130a.php and checking all steps from Step6 onwards.
     
  10. Deebs

    Deebs Well-Known Member

    @Mike

    All steps seemed to have worked apart from the following in Step6:
    Code:
     ALTER TABLE xf_login_attempt
                                    DROP ip_address_old,
                                    ADD attempt_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
                                    DROP KEY login_check,
                                    ADD KEY login_check (login, ip_address, attempt_date)
    MySQL reports the following when I attempt to run it:
    Code:
    Error Code: 1075. Incorrect table definition; there can be only one auto column and it must be defined as a key
    
    Now I do have a column labelled "autoinc" which is defined as the primary key and is an auto increment.
     
  11. Brogan

    Brogan XenForo Moderator Staff Member

    Can you run show create table xf_login_attempt ?

    Just to see if it has a mix of old and new.
     
  12. Deebs

    Deebs Well-Known Member

    Code:
    CREATE TABLE `xf_login_attempt` (
      `autoinc` int(11) NOT NULL AUTO_INCREMENT,
      `login` varchar(60) NOT NULL,
      `ip_address_old` int(10) unsigned NOT NULL,
      `attempt_date` int(10) unsigned NOT NULL,
      `ip_address` varbinary(16) NOT NULL,
      PRIMARY KEY (`autoinc`),
      KEY `login_check` (`login`,`ip_address_old`,`attempt_date`),
      KEY `attempt_date` (`attempt_date`)
    ) ENGINE=InnoDB AUTO_INCREMENT=1514 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
    
    Right, the issue is the autoinc column which is not a default XF one, so it is breaking the query. I'll fix the problem. Sorry for the bother.
     
  13. Brogan

    Brogan XenForo Moderator Staff Member

    This is how the default table should be:
    Code:
    CREATE TABLE `xf_login_attempt` (
        `attempt_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
        `login` varchar(60) NOT NULL,
        `ip_address` varbinary(16) NOT NULL,
        `attempt_date` int(10) unsigned NOT NULL,
        PRIMARY KEY (`attempt_id`),
        KEY `login_check` (`login`,`ip_address`,`attempt_date`),
        KEY `attempt_date` (`attempt_date`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8
    
     
  14. Deebs

    Deebs Well-Known Member

    Yeh I just recreated it using the schema from the install/Data/Mysql.php file.
     

Share This Page