XF 1.2 How to upgrade to XenForo 1.2 - important information and actions to be taken

Paul B

XenForo moderator
Staff member
As XenForo 1.2 introduces many new features and functions, as is typical with a second point release, there are several specific things which need to be considered when upgrading from 1.0 or 1.1 to 1.2.


Take a backup of the database before you do anything!
See here for how to backup (and restore): http://xenforo.com/community/resources/how-to-backup-and-restore-your-forum-linux-windows.359/


See this page of the manual for how to upgrade: http://xenforo.com/help/upgrades/


If you have any add-ons installed, ensure they are compatible with 1.2 before upgrading.
If in doubt disable them, perform the upgrade and then re-enable them one at a time to determine whether they still work.
Check the relevant resource for each add-on to see the status for 1.2.
There are known issues with several add-ons; these are the actions which need to be taken for them:

If you are unfamiliar with running queries, follow these steps:
  1. Open phpMyAdmin.
  2. Click on the database name on the left.
  3. Click on the SQL tab at the top.
  4. Paste in the query.
  5. Click Go.
  6. Repeat steps 3 to 5 for additional queries.

[bd] Forum Watch
Before upgrading, uninstall the add-on, run this query:
Code:
DROP TABLE xf_forum_watch
If you have already upgraded and not done the above, uninstall the add-on, run these queries:
Code:
DROP TABLE xf_forum_watch
Code:
CREATE TABLE xf_forum_watch (
        `user_id` int(10) unsigned NOT NULL,
        `node_id` int(10) unsigned NOT NULL,
        `notify_on` enum('','thread','message') NOT NULL,
        `send_alert` tinyint(3) unsigned NOT NULL,
        `send_email` tinyint(3) unsigned NOT NULL,
        PRIMARY KEY (`user_id`,`node_id`),
        KEY `node_id_notify_on` (`node_id`,`notify_on`)
    ) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci


Template Modification System (TMS)
Before upgrading, disable the add-on
If you have already upgraded and not done the above, disable all listeners via /library/config.php to access the ACP:
PHP:
$config['enableListeners'] = false;
Then disable the add-on and remove the line above from /library/config.php.


Require Thread Prefixes
Before upgrading, uninstall the add-on.
If you have already upgraded and not done the above, uninstall the add-on, run this query:
Code:
ALTER TABLE xf_forum
ADD require_prefix TINYINT UNSIGNED NOT NULL DEFAULT '0',
ADD allowed_watch_notifications VARCHAR(10) NOT NULL DEFAULT 'all',
ADD default_sort_order VARCHAR(25) NOT NULL DEFAULT 'last_post_date',
ADD default_sort_direction VARCHAR(5) NOT NULL DEFAULT 'desc';


Tapatalk
Disable or uninstall the add-on.


If you have a custom style it is highly likely that it will not work in 1.2 and will require updating. If the style is from a third party, ensure there is a new compatible release before you upgrade otherwise you will need to wait until the author releases an update.


There are some new and updated images so if you have a custom style directory you will need to copy those to the relevant folders.
They are:
  • styles\my-style\xenforo\xenforo-ui-sprite.png
  • styles\my-style\xenforo\magnifier.png
  • styles\my-style\xenforo\editor\icons.png
  • styles\my-style\xenforo\widgets\style-preview.png
  • styles\my-style\xenforo\permissions\edit.png

There have been many changes to Style Properties but as these are not versioned they won't be listed as outdated.
As such, any SPs which have been changed will not be updated with the changes in 1.2.
You will need to manually update them or revert them and reapply your customisations.
This is especially important for the responsive functionality as previous settings included a fixed width in the HTML section, which will stop the style being responsive.
Some of the more important changes are as follows:
  • General - HTML (html) - important: the min-width was removed
  • General - Page Width Controller (pageWidth) - important: the min-width was removed and some margins/paddings were adjusted
  • Header and Navigation - Selected Tab Sub-Link (navTabLink)
  • Breadcrumb - Container (breadBox)
  • Breadcrumb - Breadcrumb (breadcrumb) - important: there is now a height specified
  • Breadcrumb - Item Container (breadcrumbItemCrust)
  • Breadcrumb - Jump Menu Trigger (breadcrumbJumpMenuTrigger)
  • Login Bar - Login Form (loginBarForm) - important: the width was removed
  • PageNav, Link Groups and Tabs - PageNav / Link Group Container (pageNavLinkGroup)
  • PageNav, Link Groups and Tabs - PageNav Container (pageNav)
  • PageNav, Link Groups and Tabs - Tabs Container (tabsContainer)
  • Sidebar - Sidebar (sidebar)
  • Forms - Max Form Width (formWidth) - note: this now controls the maximum form width
  • Forms - Form Control Unit Label Width (ctrlUnitLabelWidth) - important: the width is now a percentage
  • Forms - Control Explanatory Text (ctrlUnitCtrlExplain)
  • Overlays and Tooltips - Redirect Message Container (redirectMessage) - important: max-width is now overridden
  • Popup Menus - Popup Control Arrow (closed) (popupArrowClosed)
  • Discussion List - Stats Cell Width (discussionListStatsWidth)
  • Discussion List - Options Panel Handle (discussionListOptionsHandle)
  • Message Layout - Main Content (messageContent)
  • Message Elements - Signature (messageSignature)
  • Member List Item - Username (Guests) (memberListItemGuest)
  • Member Profile Page - Sidebar Info Field Name (profilePageSidebarInfoBlockDt)
  • Member Profile Page - Sidebar Info Field Value (profilePageSidebarInfoBlockDd)
  • The pageNavLink and pageNavPage properties were removed and combined into pageNavItem.
Use the Customized Components page in the ACP to see a full list of all changed Style Properties.


If responsive design is not working, check the following elements of Style Properties:
  • General -> HTML - ensure there is no min-width specified in the Miscellaneous field; if there is, remove it
  • General -> Page Width Controller - ensure there is no min-width or width specified in the Miscellaneous fields; if there is, change it to max-width
  • Responsive Design - ensure Enable responsive design is checked

Naturally any outdated templates will need to be dealt with - either by reverting and reapplying your customisations or using the new template merge functionality.


If you use EXTRA.css, you may need to verify your code as some CSS classes have been changed or deprecated.


Update the BB Code media Sites with the latest embed codes.
Dailymotion
Code:
<iframe frameborder="0" width="500" height="300" src="http://www.dailymotion.com/embed/video/{$id}?width=500&hideInfos=1"></iframe>

Facebook
Code:
<iframe src="https://www.facebook.com/video/embed?video_id={$id}" width="500" height="300" frameborder="0"></iframe>

Liveleak
Code:
<iframe width="500" height="300" src="http://www.liveleak.com/ll_embed?i={$id}" frameborder="0" allowfullscreen></iframe>

Metacafe
Code:
<iframe src="http://www.metacafe.com/embed/{$id:digits}/" width="500" height="300" allowFullScreen frameborder=0></iframe>

Vimeo
Code:
<iframe src="http://player.vimeo.com/video/{$id}" width="500" height="300" frameborder="0"></iframe>

YouTube
Code:
<iframe width="500" height="300" src="http://www.youtube.com/embed/{$id}?wmode=opaque" frameborder="0" allowfullscreen></iframe>


There is now the option to rebuild attachment thumbnails.
Available in Tools -> Rebuild Caches, this is particularly useful if you have imported from another platform or changed your thumbnail size at any time.


Go through all of the new features, options and permissions, setting them up as required.
See the announcement thread here for more on that: http://xenforo.com/community/threads/xenforo-1-2-0-released.55982/ or the full list of HYS threads for 1.2 features: http://xenforo.com/community/forums/have-you-seen/?prefix_id=30


If you use Google AdSense, ensure you update the ad_ templates code if you plan to use the responsive design feature.
See this resource: http://xenforo.com/community/resources/responsive-adsense.2084/


Known Issues
In rare cases, a race condition during the upgrade process will result in an error stating that "Table 'forum.xf_deferred' doesn't exist". If this only occurs during the upgrade and does not continue after the upgrade has completed, it can be ignored.


Obsolete Files
For a list of obsolete files that are no longer used within XenForo, please see the following post:
http://xenforo.com/community/threads/xenforo-1-1-5-obsolete-files.56022/#post-598339


Finally, enjoy 1.2 :)
 
Do you have any tips for minimizing down time during an upgrade? Is it best to upgrade add-ons before or after upgrading, since this is a majority of the time besides the XF upgrade?
 
That depends on the add-on.

If it is compatible with both 1.1.x and 1.2 then you can upgrade the add-on before upgrading XenForo.
Otherwise it will need to be upgraded afterwards with the 1.2 compatible version.
 
That depends on the add-on.

If it is compatible with both 1.1.x and 1.2 then you can upgrade the add-on before upgrading XenForo.
Otherwise it will need to be upgraded afterwards with the 1.2 compatible version.

Ok thanks! Xf 1.2 looks great. Currently testing it and the upgrade was almost painless, a couple add-on upgrades and it will be all set!
 
It would be good if the resource area had a field that said "compatible up to X version of Xenforo". Sort of like how wordpress has it on their plugins page. And be able to sort by version type to ensure which addons are compatible with which Xenforo version.
 
Added a bit on the new thumbnail rebuild function.

There is now the option to rebuild attachment thumbnails.
Available in Tools -> Rebuild Caches, this is particularly useful if you have imported from another platform or changed your thumbnail size at any time.
 
Anyone encountering this error:
Uh oh, your upgrade to 1.2.0 has failed!

The following elements of the database are incorrect:

  • Column xf_forum.allowed_watch_notifications missing.
  • Column xf_forum.default_sort_order missing.
  • Column xf_forum.default_sort_direction missing.

Should run these queries:
Code:
ALTER TABLE xf_forum DROP require_prefix;

Code:
ALTER TABLE xf_forum
ADD require_prefix TINYINT UNSIGNED NOT NULL DEFAULT '0',
ADD allowed_watch_notifications VARCHAR(10) NOT NULL DEFAULT 'all',
ADD default_sort_order VARCHAR(25) NOT NULL DEFAULT 'last_post_date',
ADD default_sort_direction VARCHAR(5) NOT NULL DEFAULT 'desc';
 
  • Like
Reactions: rdn
I'm starting to look at the process for upgrading from 1.14 to 1.2, and this article is going to be exceptionally useful.

Couple of (potentially) stupid questions though...
If you have any add-ons installed, ensure they are compatible with 1.2 before upgrading.
If in doubt disable them, perform the upgrade and then re-enable them one at a time to determine whether they still work.
Does this mean that I should install the 1.2 version of an add-on before running the update?

These are the actions which need to be taken for the following add-ons:
Would it be easier to remove them before the upgrade, and then install the 1.2 version afterwards (if still required)?
 
Does this mean that I should install the 1.2 version of an add-on before running the update?
Only if the 1.2 version is also compatible with 1.1.

Would it be easier to remove them before the upgrade, and then install the 1.2 version afterwards (if still required)?
That doesn't always help as some add-ons don't remove changes made to the database when they are uninstalled.
Generally though, yes, uninstall add-ons you no longer require before upgrading.
 
Logical question: We have lots of users who have installed Tapatalk for mobile access. So is this something where support will be added — or do they have to make a 1.2 compatible version?
 
Added a new section to the end of the guide.

Known Issues
In rare cases, a race condition during the upgrade process will result in an error stating that "Table 'forum.xf_deferred' doesn't exist". If this only occurs during the upgrade and does not continue after the upgrade has completed, it can be ignored.
 
Back
Top Bottom