Newsplus:Upgrade to version 2.1.0 for Drupal 7
From MtTWiki
This document will guide you to upgrade your Drupal 7 News+ 2.0.1 installation to News+ 2.1.0 for Drupal 7.
The steps that are tagged [Commerce] are relevant only to the News+ Commerce 7.x distribution and should be skipped if you are running the simple News+ 7.x distribution. The News+ Commerce 7.x distribution is only available in the News+ Pro & News+ Enterprise products. You can find out more about the News+ Commerce distribution at the News+ product page http://www.morethanthemes.com/?q=themes/newsplus
Prepare your workbench
- Create a temporary installation of Drupal 7 News+ 2.1.0 using our installation profile. You will use this as a reference to guide you.
Backup
- Backup everything.
- Just in case, make sure you backed up everything =) (besides, it's always a good idea).
Put your website in maintenance mode
- Login to your Drupal installation as administration user
- Navigate to admin/config/development/maintenance
- Enable the "Put site into maintenance mode" option
- Save your configuration
Update Drupal core
Take a breath and read Drupal's Upgrading from previous versions first. This upgrade will update your Drupal core to the version 7.41. We assume that you are currently using a 7.x version so it's about a "Minor update procedure".
- Locate the root folder of your site. This is Drupal's root folder, where the index.php file is located.
- Delete all Drupal files and folders except the [sites] folder.
- Copy all Drupal files and folders from your temporary installation except the [sites] folder.
- Run the update.php file calling a url like http://www.example.com/update.php or http://www.example.com/test_site/update.php, if your site is located under a subdirectory.
Update extra modules
News+ comes with several extra modules required to achieve its functionality. The following process will update them to the latest (by the time these lines are written) version, as marked below:
- Update Chaos tool suite (ctools) to version 7.x-1.9
- Update jQuery Update (jquery_update) to version 7.x-2.7
- Update Twitter (twitter) to version 7.x-5.11
- Update Views (views) to version 7.x-3.13
- Update Webform (webform) to version 7.x-3.24
- Locate the extra modules folder of your site, usually at [sites/all/modules].
- Delete the folders ctools, jquery_update, twitter, views, webform that belong to the News+ distribution. If there are any extra module folders that have been installed by you later, you should leave them untouched or update them later manually, which is beyond the scope of this guide
- Copy the latest version of the deleted module from your temporary installation.
- Run the update.php file calling a url like http://www.example.com/update.php or http://www.example.com/test_site/update.php, if your site is located under a subdirectory.
[Commerce] Update Commerce modules
News+ comes with several extra Commerce modules required to achieve its functionality. The following process will update them to the latest (by the time these lines are written) version, as marked bellow:
- [Commerce] Update Address Field (addressfield) to version 7.x-1.2
- [Commerce] Update Drupal Commerce (commerce) to version 7.x-1.11
- [Commerce] Update Commerce Shipping (commerce_shipping) to version 7.x-2.2
- [Commerce] Update Entity API (entity) to version 7.x-1.6
- [Commerce] Update Update Inline Entity Form (inline_entity_form) to version 7.x-1.6
- [Commerce] Update Rules (rules) to version 7.x-2.9
- Locate the extra modules folder of your site, usually at [sites/all/modules/contrib].
- Delete the folders addressfield, commerce, commerce_shipping, entity, inline_entity_form, rules that belong to the News+ distribution. If there are any extra module folders that have been installed by you later, you should leave them untouched or update them later manually, which is beyond the scope of this guide.
- Copy the latest version of the deleted module from your temporary installation.
- Run the update.php file calling a url like http://www.example.com/update.php or http://www.example.com/test_site/update.php, if your site is located under a subdirectory.
Patch your News+ theme files
- Locate our theme folder in your temporary installation. Usually at [sites/all/themes/newsplus]
- Locate our theme folder in your drupal 7 site. Usually at [sites/all/themes/newsplus]
- Replace the following files or folders in your installation, using the corresponding source files from the temporary installation (folders should be first deleted and finally copied from your temp installation).
- newsplus.info
- style.css
- template.php
- theme-settings.php
- bootstrap
- js/flexslider
- Add the following files in your installation, using the corresponding source files from the temporary installation
- js/jquery.browser.min.js
- flippy.tpl.php
Update your News+ theme configuration
The following process will ensure that the correct version of jQuery is selected.
- Navigate to admin/config/development/jquery_update
- Select the 1.10 option of the Default jQuery version select box
- Select the 1.7 option of the Alternate jQuery version for administrative pages select box
- Save your configuration
News+ now implements the next/prev Post navigation based on the flippy module. The old implementation would cause performance issues in sites with a lot of nodes so it is strongly recommended to perform the tasks bellow.
- Locate the extra modules folder of your site, usually at [sites/all/modules].
- Add the corresponding flippy and token module folders from your temporary installation.
- Enable the flippy module through admin/modules in the admin UI
- Navigate to admin/structure/types/manage/mt-post (Post content type edit page)
- Under the Flippy settings tab enable the Build a pager for this content type option
- Disable the Show empty links option
- Set both the Label for "Previous" link and Label for "Next" link fields to [node:title]
- Enable the Sort the pager by something other than ascending post date
- Select the Node ID Pager sort option
- Select the Ascending Pager order option
- Save the content type
- Click on the manage display option for the Post (mt_post) content type
- Set the pager field to hidden in both the default and the teaser displays and save your changes
- Navigate to admin/structure/block
- Configure the Flippy Pager (Post nodes) block to be assigned to the Page Intro region above the Internal Banner block.
- Configure the Flippy Pager (Post nodes) block to be shown only for the Post content type
- Remove the Prev/next navigation for nodes block from the Page Intro region
- Navigate to admin/structure/views
- Delete the Node Navigation view as it is no longer needed
- Locate our theme folder in your temporary installation. Usually at [sites/all/themes/newsplus]
- Delete the views-view-unformatted--mt_node_navigation--block.tpl.php file as it is no longer needed
Clear all cached data
This step is important in order to force your template to be informed for the changes you have made in the template files.
To do this navigate to admin/config/development/performance and click the "Clear all caches" button
Disable maintenance mode
- Navigate to admin/config/development/maintenance
- Disable the "Put site into maintenance mode" option.
- Save your configuration