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

XF 1.4 "The field 'activity_visible' was not recognised" after upgrading to 1.4.0

Discussion in 'Installation, Upgrade, and Import Support' started by Ketola, Sep 16, 2014.

  1. Ketola

    Ketola Member

    Testing upgrading from v1.3.5 to v1.4.0 on my dev server I ran into the following error whenever editing a user after upgrade.

    The field 'activity_visible' was not recognised.​

    Just opening a user for editing (either via admin panel or /index.php?account/preferences) and saving without changing anything pops up the error.

    The upgrade went through without issues, and no errors are logged in the server error log.

    Ideas?
     
  2. Mike

    Mike XenForo Developer Staff Member

    You can run this query:
    Code:
    ALTER TABLE xf_user ADD activity_visible TINYINT UNSIGNED NOT NULL DEFAULT 1;
    It is part of the upgrade, so it's hard to say why it didn't seem to run. It's possible it was killed while in the process of running.
     
  3. Ketola

    Ketola Member

    I forgot to mention that the xf_user table does have the activity_visible column.

    Went back to a backup already and trying to run the upgrade again. I'll update with the results.

    Same results. Here's the CREATE TABLE code for xf_user post upgrade:
    Code:
    CREATE TABLE `xf_user` (
        `user_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
        `username` VARCHAR(50) NOT NULL,
        `email` VARCHAR(120) NOT NULL,
        `gender` ENUM('','male','female') NOT NULL DEFAULT '' COMMENT 'Leave empty for \'unspecified\'',
        `custom_title` VARCHAR(50) NOT NULL DEFAULT '',
        `language_id` INT(10) UNSIGNED NOT NULL,
        `style_id` INT(10) UNSIGNED NOT NULL COMMENT '0 = use system default',
        `timezone` VARCHAR(50) NOT NULL COMMENT 'Example: \'Europe/London\'',
        `visible` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'Show browsing activity to others',
        `user_group_id` INT(10) UNSIGNED NOT NULL,
        `secondary_group_ids` VARBINARY(255) NOT NULL,
        `display_style_group_id` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'User group ID that provides user styling',
        `permission_combination_id` INT(10) UNSIGNED NOT NULL,
        `message_count` INT(10) UNSIGNED NOT NULL DEFAULT '0',
        `conversations_unread` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
        `register_date` INT(10) UNSIGNED NOT NULL DEFAULT '0',
        `last_activity` INT(10) UNSIGNED NOT NULL DEFAULT '0',
        `trophy_points` INT(10) UNSIGNED NOT NULL DEFAULT '0',
        `alerts_unread` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
        `avatar_date` INT(10) UNSIGNED NOT NULL DEFAULT '0',
        `avatar_width` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
        `avatar_height` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
        `gravatar` VARCHAR(120) NOT NULL DEFAULT '' COMMENT 'If specified, this is an email address corresponding to the user\'s \'Gravatar\'',
        `user_state` ENUM('valid','email_confirm','email_confirm_edit','moderated','email_bounce') NOT NULL DEFAULT 'valid',
        `is_moderator` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
        `is_admin` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
        `is_banned` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
        `like_count` INT(10) UNSIGNED NOT NULL DEFAULT '0',
        `warning_points` INT(10) UNSIGNED NOT NULL DEFAULT '0',
        `is_staff` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
        `activity_visible` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
        PRIMARY KEY (`user_id`),
        UNIQUE INDEX `username` (`username`),
        INDEX `email` (`email`),
        INDEX `user_state` (`user_state`),
        INDEX `last_activity` (`last_activity`),
        INDEX `message_count` (`message_count`),
        INDEX `trophy_points` (`trophy_points`),
        INDEX `like_count` (`like_count`),
        INDEX `register_date` (`register_date`),
        INDEX `staff_username` (`is_staff`, `username`)
    )
    COLLATE='utf8_general_ci'
    ENGINE=InnoDB
    AUTO_INCREMENT=3;
    
     
  4. Ketola

    Ketola Member

    Found the issue. We have customisations in place in DataWriter/User.php for account syncing, and instead of patching only the custom code, I had inadvertently patched the file with a complete diff from v1.3.5. Oopsie.

    No bug here. Move along.
     

Share This Page