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 :)
 
I've made some changes to the default Xenforo style templates, but these changes are in child styles.

I have a test site where I upgraded to 1.2 without doing anything with these templates before upgrading. I got a lot of outdated templates, and the Help page especially looked quite bad. It wasn't possible to merge the outdated templates, maybe because the changes were in the child styles. However, I was able to fix it manually by reverting the templates and re-doing the changes in the parent style.

For the live site, is it better to re-do these template changes in the parent Xenforo style before I run the upgrade? Or is there a better solution?

Can I export the fixes I did on the test site and import that on the live site?
 
Added a new bit on how to get responsive design working.

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 field; if there is, change it to max-width
  • Responsive Design - ensure Enable responsive design is checked
 
You can export the style and import it.

I just reverted all templates and added my edits again, reviewing whether I still needed them; a fresh start.
For the next upgrade I will use the merge function.

If i don't revert and use the merge feature, will it work as it used to work previously ?
 
In the download section, I have tthe option to download only the upgrade files for 1.2. But I am using currently version 1.1.3. I assume this upgrade package requires that one has already version 1.1.5 installed.

So I guess I need to use the fullpackage download of 1.2 full version.

Is this correct?
 
I'm in the process of upgrading our site to 1.2.0. After my first try, everything seemed to work until I got to testing a reply to a post. The input field/box isn't showing up but the reply and other buttons do. I then tried another test upgrade with all add-ons disabled and got the same results. Then I tried with all add-ons uninstalled, nothing different. My next attempt will be to remove all custom styles and see if that helps. If not, next will be looking into templates and that leads me to my question. Is there a way, after the upgrade, to overwrite the existing templates and just start fresh with the 1.2.0 ones? I'm sure my issue is related to some customized change we did in the past but I wasn't here then so just a guess. Any help would be greatly appreciated.
 
If you want to start with a default style, create a new style or just revert all of the templates and style properties in your current style.
 
Just wanted to note the upgrade guide helped a lot. :) Upgraded from 1.1.4 yesterday to the current version 1.2.1.
Turned of all add-ons. Upgraded xenforo. Upgraded all add-ons and turned them on.

The new engine rocks! Thanks guys for your help. It was a smooth experience! :)
 
OK - I majorly messed up!!! I tried to do the upgrade not knowing the issues with Forum Watch and now I have a mess. I desperately need your help - the instructions above might as well be in Greek! Can you help me fix our community? Thank you!
 
OK - I majorly messed up!!! I tried to do the upgrade not knowing the issues with Forum Watch and now I have a mess. I desperately need your help - the instructions above might as well be in Greek! Can you help me fix our community? Thank you!
If you cannot run the query given, create a ticket for xf support can help you.
 
Is this possible?
1. Copy my existing 1.1 XF (files and DB) to a DEV environment
2. Perform the upgrade and make all necessary changes to styles, etc. (add-ons, excluded)
3. Export/save the new/updated style for 1.2
4. Schedule outage and;
4.1 Copy all files from DEV to Production
4.2 Run a DB script (or perform the upgrade again) to update the Production DB
4.3 Upgrade all add-ons, where required/appropriate.
5. Import the style from step 3

Steps 3, 4.2, and 5 are essentially the ones of importance, and for which I seek opinion/clarity.

It will mean I can spend days/weeks checking and performing the 'trial' upgrade for my site, without having to record and redo all the changes and style fixes I make for the Production upgrade. Perhaps there's a thread or discussion(s) on other users upgrade methodologies that I missed?

Thanks.
 
When upgrading, should it be sending out a pile of emails? For some reason I haven't been getting emails for a little while but with my updates I get a lot of emails. This time I received 200. I'm hoping my members are not getting hit with all of these as well. Any ideas on why that is happening?

James
 
Top Bottom