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 :)
 
This should be in the resource manager. IMO this shows a flaw in the resource manager. You needed to have this pinned in an important forum so it would get views. This would not be possible under the current resource manager. Now your only option is to duplicate this first post in the resource manager or not use it at all in there.

Someone looking here: http://xenforo.com/community/resources/categories/xenforo-tips-and-guides.34/ would never find this.

This is the flaw that existed under vBulletin when you start building out from the forum. Organization becomes an issue.

Why can't Resources simply be a new Node type or an extension of Nodes in someway?
 
Last edited:
This should be in the resource manager. IMO this shows a flaw in the resource manager. You needed to have this pinned in an important forum so it would get views. This would not be possible under the current resource manager. Now your only option is to duplicate this first post in the resource manager or not use it at all in there.

Someone looking here: http://xenforo.com/community/resources/categories/xenforo-tips-and-guides.34/ would never find this.

This is the flaw that existed under vBulletin when you start building out from the forum. Organization becomes an issue.

Why can't Resources simply be a new Node type or an extension of Nodes in someway?
It makes perfect sense for this topic to be in "Installation, Upgrade, and Import Support" forum. Since the first place everyone will check if they have an error or doubt regarding upgrade is this forum, not the resource manager.

But the post you made is more of a suggestion, I guess posting it elsewhere would get it more attention, about the flaw that you bring up since others may have similar opinions as well.
 
It makes perfect sense for this topic to be in "Installation, Upgrade, and Import Support" forum. Since the first place everyone will check if they have an error or doubt regarding upgrade is this forum, not the resource manager.

But the post you made is more of a suggestion, I guess posting it elsewhere would get it more attention, about the flaw that you bring up since others may have similar opinions as well.

Mods can feel free to split this off. Just wanted to highlight that I was trying to find this thread to point it to someone and was looking in the Resource Manager for it under the Guides category.

I know it makes sense to have it here. It also makes sense to have it in the Resource Manager under that category. Except we continue to run into this in 2013 with forum software where Add-ons are kind of boxed out of the forum to an extent where it causes things like this to pop up.
 
I could have put it here, in the RM or both.

I could also have put it in the RM and then moved the thread from the guides forum to this forum and pinned it.

I just chose to put it here as for upgrade support people would naturally visit this forum rather than the RM, in my opinion.

However, to ensure maximum exposure, I have now also added it to the RM and linked it to this thread: http://xenforo.com/community/resources/how-to-upgrade-to-1-2.2397/
 
Question, I have uploaded all the 1.2.1 file but have not run the upgrade, can I re upload the 1.1.4 to get the site working again so I can disable all adons before uploading with out messing things up worse?
 
Question, I have uploaded all the 1.2.1 file but have not run the upgrade, can I re upload the 1.1.4 to get the site working again so I can disable all adons before uploading with out messing things up worse?
Just disable them in your config.php in the /library directory
$config['enableListeners'] = 0
then do the upgrade and once upgraded go in and check all of the add-ons off. You can then remove the ones you need that you know are not compatible and upgrade those that are.
 
Just disable them in your config.php in the /library directory
$config['enableListeners'] = 0
then do the upgrade and once upgraded go in and check all of the add-ons off. You can then remove the ones you need that you know are not compatible and upgrade those that are.

Is this gonna be a problem?

Upgrade Errors
Uh oh, your upgrade to 1.2.2 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.
This is likely caused by an add-on conflict. You may need to restore a backup, remove the offending add-on data from the database, and retry the upgrade. Contact support if you are not sure how to proceed.
 
I have followed this entire thread, gone through support to get this,

I suspect that you've now removed the edit tracking add-on? The challenge here is that it has removed columns that conflicted with the standard XenForo columns. (We recommend all add-on developers use prefixes to avoid these occurrences, but unfortunately this doesn't always happen.)

Unfortunately, I don't know what columns the add-on has removed. The author should be able to tell you and provide you the necessary guidance to ensure your database is intact.

If that is not an option, you could run the following queries:

ALTER TABLE xf_post ADD last_edit_date INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE xf_post ADD last_edit_user_id INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE xf_post ADD edit_count INT UNSIGNED NOT NULL DEFAULT 0;

One or more of these queries may error. I only know one of the columns that has been removed.

WTF? What is edit tracking add-on?? I never had anything like that?

When I try to post I get this,

The following error occurred:
Mysqli prepare error: Unknown column 'last_edit_user_id' in 'field list'
  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
  5. Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1612
  6. XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1601
  7. XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1393
  8. XenForo_DataWriter->save() in XenForo/DataWriter/Discussion.php at line 477
  9. XenForo_DataWriter_Discussion->_saveFirstMessageDw() in XenForo/DataWriter/Discussion.php at line 426
  10. XenForo_DataWriter_Discussion->_postSave() in XenForo/DataWriter.php at line 1397
  11. XenForo_DataWriter->save() in XenForo/ControllerPublic/Forum.php at line 678
  12. XenForo_ControllerPublic_Forum->actionAddThread() in XenForo/FrontController.php at line 337
  13. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  14. XenForo_FrontController->run() in /nfs/c07/h02/mnt/XXXX/domains/flytyingbug.com/html/index.php at line 13

Against my better judgment I decided to upgrade and has proved to be a huge mistake on my part, day number two of my site being down. :(
 
I have already answered your queries via the support ticket. I have even logged in and resolved some of the issues via phpMyAdmin, even though these schema errors relate to conflicts caused by third-party add-ons that are or have been installed. We are trying to help and you've gotten 5 responses from me in the ticket outside of "normal" business hours.
 
Hi @Brogan After uploading the upgrade files from (xenforo_1.2.3_###_upgrade) I'm getting this error below:

An exception occurred: Mysqli prepare error: Table 'user_xendb1.xf_deferred' doesn't exist in /home/user/public_html/library/Zend/Db/Statement/Mysqli.php on line 77

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 825
  5. Zend_Db_Adapter_Abstract->fetchOne() in XenForo/Model/Deferred.php at line 148
  6. XenForo_Model_Deferred->updateNextDeferredTime() in XenForo/Dependencies/Abstract.php at line 183
  7. XenForo_Dependencies_Abstract->preLoadData() in XenForo/FrontController.php at line 127
  8. XenForo_FrontController->run() in /home/user/public_html/index.php at line 13
I've also disabled all the listeners via config.php
 
Last edited by a moderator:
From the first post.

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.
 
I'm upgrading from 1.1.2 to the current version and I have two questions about merging templates.

1.) Can I use the "Template Merge" functionality in this upgrade or does it only work with upgrades from 1.2 to future versions? If it works, then I'm just going to upgrade away without documenting template changes first. However, if all of my templates get overwritten before I can document them that would really really suck.

2.) Pretty much all users on our site use a custom style based on the "Default Style" that comes with xenForo. Only 15 modified templates separate the two. Given that "Our Style" is a child style of "Default," if we can use Template Merge functionality with this update how will the child style ("Our Style") be handled? Is xF's Template Merge functionality smart enough to help merge changes when the parent style is changed in an upgrade? If not, is there a recommended way to use Template Merge to merge our changes into the new templates?
 
If you just do a straight upgrade, you should be able to use the merging system. (The merging system is not usable unless you do an upgrade with the customizations in place; that is, it won't work if you import an out of date style after upgrading.) If you have concerns about the amount of work involved, I'd recommend upgrading a test installation. The merge system is not a panacea -- if you have changed the same code that we have changed, you will need to make a manual decision of what to do. Further, it's possible that your changes rely on an assumption from 1.1 that is no longer true in 1.2 due to underlying changes; in this case, your change may need to be approached differently.

The merge system will handle the multi-level style structure as it will compare your changes against the master version's, assuming they haven't been changed in the "default" version. (If they have changed in the default version, then the default version would be out of date; when you bring that up to date, then the "our style" version would be out of date.)
 
We have a beta site running XF 1.2.2 and we have updated, configured and tweaked all of our addons there. We've finally got everything just right and we're ready to upgrade the main forum.
Is it possible if we upgrade the main forum to XF 1.2.2 to then copy over all of the relevant folders in the include, js, and styles folder and just install the xml of each addon again? Is there another way? Or do we have to install all the addons again from scratch? There's things like xfimage we have populated with a lot of images which would be very painful to have to redo again.

We can't don't think we can use our beta site as the live site because we have thanks and post counts to transfer across and we're not sure if/how we can do this?
 
There's no easy way to do that.
You could export and import the style but you still need to run the upgrade and then upgrade the add-ons.
 
Can anyone help me with this upgrade?

I get the following error when trying to create a post.
Argument 1 passed to EWRatendo_DataWriter_Discussion_Thread::_discussionPostSave() must be an array, none given, called in /home/txinfish/public_html/forum/library/XenForo/DataWriter/Discussion.php on line 453 and defined
  1. XenForo_Application::handlePhpError() in EWRatendo/DataWriter/Discussion/Thread.php at line 5
  2. EWRatendo_DataWriter_Discussion_Thread->_discussionPostSave() in XenForo/DataWriter/Discussion.php at line 453
  3. XenForo_DataWriter_Discussion->_postSave() in XenForo/DataWriter.php at line 1397
  4. XenForo_DataWriter->save() in XenForo/ControllerPublic/Forum.php at line 678
  5. XenForo_ControllerPublic_Forum->actionAddThread() in XenForo/FrontController.php at line 337
  6. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  7. XenForo_FrontController->run() in /home/txinfish/public_html/forum/index.php at line 13

When people try and join my forum they get...

Forum - Error

A server error occurred. Please try again later.
 
I still get the error when trying to run a test signup and when deleting a newly created thread I get the following error. Fixed the error of creating a thread by upgrading Xenatendo. :X3:

Argument 1 passed to WidgetFramework_Extend_DataWriter_Discussion_Thread::_discussionPostDelete() must be an array, none given, called in /home/txinfish/public_html/forum/library/EWRatendo/DataWriter/Discussion/Thread.php on line 19 and defined

  1. XenForo_Application::handlePhpError() in WidgetFramework/Extend/DataWriter/Discussion/Thread.php at line 12
  2. WidgetFramework_Extend_DataWriter_Discussion_Thread->_discussionPostDelete() in EWRatendo/DataWriter/Discussion/Thread.php at line 19
  3. EWRatendo_DataWriter_Discussion_Thread->_discussionPostDelete() in XenForo/DataWriter/Discussion.php at line 762
  4. XenForo_DataWriter_Discussion->_postDelete() in XenForo/DataWriter.php at line 1767
  5. XenForo_DataWriter->delete() in XenForo/Model/InlineMod/Thread.php at line 216
  6. XenForo_Model_InlineMod_Thread->deleteThreads() in XenForo/ControllerPublic/InlineMod/Thread.php at line 44
  7. XenForo_ControllerPublic_InlineMod_Thread->actionDelete() in XenForo/FrontController.php at line 337
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  9. XenForo_FrontController->run() in /home/txinfish/public_html/forum/index.php at line 13
 
Top Bottom