Upgrade Drupal-Localizer-5.x-1.x to Drupal-Localizer-5.x-3.x

If you are still using Drupal-Localizer-5.x-1.x, please consider upgrading to Drupal-Localizer-5.x-3.x. The localizer module will not be upgraded to Drupal-6. Upgrading your Drupal-Localizer-5.x-1.x to Drupal-Localizer-5.x-3.x will make you site compatible for upgrading to Drupal-6.

HowTo: Upgrading from Localizer 1.10 to 3.x is what you need to follow. Below is my note taken when upgrading from Drupal-Localizer-5.x-1.11 to Drupal-Localizer-5.x-3.11.

  1. Check how you patched block, menu, and taxonomy modules. Please leave the original core package as is, and place the patched version inside the localizer directory. Your localizer directory will most likely be sites/all/modules/drupal-contrib/localizer. You patched taxonomy module should be in sites/all/modules/drupal-contrib/localizer/taxonomy. Same for menu and block modules.
    If you need to move the patched modules' directories, after the move, please open the page admin/build/modules for the system to recognize the directory changes.
  2. Backup your database. This is important.
  3. Download the various Localizer 3.x components. This includes Localizer itself, which can be found at http://drupal.org/project/localizer, and flag graphics which can be found at http://www.speedtech.it/drupal-localizer. Don't upload these archives to your server just yet.
  4. Login as your site's #1 user (uid = 1). Goto admin/settings/site-maintenance and mark the site as off-line.
  5. If you have localizerblock module enabled, go to admin/build/modules and disable it. This module is no longer available into Drupal-Localizer-5.x-3.x.
  6. Move your old localizer directory out of the way (to outside of your docroot), and move your new localizer into sites/all/modules/drupal-contrib/localizer.
  7. If you have previously setup Localizer 1.x correctly, you will have appended the following code to the end of your sites/default/settings.php file:

    $conf= array
          (
              'cache_inc' =>
          'sites/all/modules/localizer/system/includes/cache.inc',
          );

    This code needs to be deleted.

    Then, append the following code to the end of your sites/default/settings.php file (just before the php closure ?> if you have one in your file).

    include_once('sites/all/modules/drupal-contrib/localizer/localizer_settings.php');

    Save the file. Then, in File manager, click on settings.php again but this time click on Show file. Scroll down to the bottom and check to make sure that the added line is there and the old code is gone.

    Assuming everything is there as it should be, change the permissions back to 444 by clicking on settings.php, and then from the menu that appears on the right, click Change Permissions. Refresh your screen once to check that the permissions have really changed.

    That concludes the editing of the settings.php file.

  8. Next, in your open browser window, visit www.yoursite.com/update.php to run the database update script.
  9. Open your admin/build/menu to refresh your paths related to localizer module.
  10. Open your admin/settings/localizer and examine the settings. "Language prefix" is a new set of options. Make sure your check that too.
  11. Open your admin/user/access and set the permissions.
  12. Verify everything works. In my article listing page, all articles from different languages show up. To fix this, go back to admin/settings/localizer and turn off "Activate content language fallback support" inside "Content setting". You get better performances too.
  13. Go to admin/settings/site-maintenance and mark the site as on-line.