Show
Ignore:
Timestamp:
03/19/08 18:59:22 (21 months ago)
Author:
bsmith
Message:

adding readme steps

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/CustomFieldsUpgradeAssistant/README

    r465 r562  
    1 CustomFields Upgrade Assistant lets you upgrade the Custom Fields data and field structure created and maintained by the older versions of Custom Fields plugin written by Arvind to the structure suitable to Movable Type 4.1. 
     1CustomFields Upgrade Assistant lets you upgrade the Custom Fields data and field structure created and maintained by the older versions of Custom Fields plugin (written by Arvind Satyanarayan of www.movalog.com) to the structure suitable to Movable Type 4.1. 
    22 
    3 This plugin includes the directory whose name is "Custom Fields".  In the directory, it includes plugin defition script whose name is "customfields.pl".  Both the directory and the file were *not* mistakenly named.  The plugin is intended to overwrite your exisiting Custom Fields plugin.  Please make sure you backup the database and the plugin directories and files before upgrading, so if *something* happens, you can go back to the original state. 
     3 
     4The plugin is intended to overwrite your exisiting Custom Fields plugin.  This plugin includes the directory whose name is "Custom Fields", in the directory there is a plugin defition script whose name is "customfields.pl"; both the directory and the file were *not* mistakenly named. 
     5 
     6Please make sure you backup the database and the plugin directories and files before upgrading, so if *something* happens, you can go back to the original state. 
     7 
     8Jessee Gardner (with help from Six Apart's David Phillips aka TweezerMan) wrote a great CustomFields migration tutorial at: http://www.movabletweak.com/app/migrating_customfields_movable_type.php. The steps are repeated here 
     9 
     101. Remove existing CustomFields plugin 
     11 
     12    $MTDIR/plugins/CustomFields 
     13 
     142. Install the CustomFieldsUpgradeAssistant plugin. This upgrade plugin has the same name as the original plugin and should be placed in the same location as the original plugin. 
     15 
     163. Removing orphans via MySQL. 
     17 
     18Arvind's plugin didn't delete custom field data when the objects it was attached to were deleted. These two MySQL queries will remove that data: 
     19 
     20    DELETE FROM mt_plugindata WHERE  
     21    LEFT( plugindata_key, 6 ) = 'entry_'  
     22    AND plugindata_plugin = 'CustomFields'  
     23    AND (SELECT entry_id FROM mt_entry  
     24    WHERE LEFT( plugindata_key, 6 ) = 'entry_'  
     25    AND plugindata_plugin = 'CustomFields'  
     26    AND SUBSTRING( plugindata_key, 7 ) = entry_id) IS NULL; 
     27     
     28    DELETE FROM mt_plugindata WHERE 
     29    LEFT( plugindata_key, 1 ) = '_'  
     30    AND plugindata_plugin = 'CustomFields'  
     31    AND (SELECT author_id FROM mt_author  
     32    WHERE LEFT( plugindata_key, 1 ) = '_'  
     33    AND plugindata_plugin = 'CustomFields'  
     34    AND SUBSTRING( plugindata_key, 2 ) = author_id) IS NULL; 
     35 
     364. Fix a bug in Custom Fields 
     37 
     38Open $MTDIR/addons/Commercial.pack/lib/CustomFields/Util.pm 
     39 
     40Go to line 322, which looks like this: 
     41     
     42    my $text = ($entry->text || '') . "\n" . ($entry->text_more || ''); 
     43     
     44And change to: 
     45     
     46    my $text = ($obj->text || '') . "\n" . ($obj->text_more || ''); 
     47 
     485. Access your MT install, and you will be prompted to upgrade. Click "upgrade" and you're done with the upgrade.