<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://townx.org" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>townx - Upgrading from Drupal 4 to 5 - Comments</title>
 <link>http://townx.org/blog/elliot/upgrading-from-drupal-4-to-drupal-5</link>
 <description>Comments for &quot;Upgrading from Drupal 4 to 5&quot;</description>
 <language>en</language>
<item>
 <title>I am always very afraid of</title>
 <link>http://townx.org/blog/elliot/upgrading-from-drupal-4-to-drupal-5#comment-38617</link>
 <description>&lt;p&gt;I am always very afraid of upgraded and other stuff. That&#039;s why I hate wordpress because it almost has upgrades each week. Fortunately I am not an old blogger so I have just started blogging with Drupal 6. I love it because there is nothing better than it.&lt;/p&gt;</description>
 <pubDate>Wed, 03 Dec 2008 17:58:35 -0600</pubDate>
 <dc:creator>Leonardo Medina</dc:creator>
 <guid isPermaLink="false">comment 38617 at http://townx.org</guid>
</item>
<item>
 <title>As you can see, I&#039;ve stuck</title>
 <link>http://townx.org/blog/elliot/upgrading-from-drupal-4-to-drupal-5#comment-38515</link>
 <description>&lt;p&gt;As you can see, I&#039;ve stuck with an old version. In your position, I&#039;d try to go from 4 to 5, then from 5 to 6. 4 to 6 is bound to cause endless pain.&lt;/p&gt;</description>
 <pubDate>Fri, 10 Oct 2008 13:49:08 -0500</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">comment 38515 at http://townx.org</guid>
</item>
<item>
 <title>Well, I have tried to update</title>
 <link>http://townx.org/blog/elliot/upgrading-from-drupal-4-to-drupal-5#comment-38513</link>
 <description>&lt;p&gt;Well, I have tried to update my blogs from Drupal 4 to 6 and I faced some unexpected problems. I decided to lieve my blogs with 4th version...&lt;/p&gt;</description>
 <pubDate>Thu, 09 Oct 2008 16:46:03 -0500</pubDate>
 <dc:creator>Zygor</dc:creator>
 <guid isPermaLink="false">comment 38513 at http://townx.org</guid>
</item>
<item>
 <title>elliot</title>
 <link>http://townx.org/blog/elliot/upgrading-from-drupal-4-to-drupal-5#comment-14221</link>
 <description>&lt;p&gt;Your last update code is the one I&#039;m looking for. Thanks and regards.&lt;/p&gt;</description>
 <pubDate>Fri, 22 Jun 2007 14:19:13 -0500</pubDate>
 <dc:creator>Ordering yasmin</dc:creator>
 <guid isPermaLink="false">comment 14221 at http://townx.org</guid>
</item>
<item>
 <title>Thanks...</title>
 <link>http://townx.org/blog/elliot/upgrading-from-drupal-4-to-drupal-5#comment-14199</link>
 <description>&lt;p&gt;I&#039;ll give that a go and let you know.&lt;/p&gt;

&lt;p&gt;Incidentally, I see you&#039;re suffering from another problem I&#039;ve been battling with - that Captcha tells you you have not entered a correct captcha value even as you load a form for the first time.  The only way I&#039;ve found of fixing that so far is to switch to a module called &quot;MyCaptcha&quot; - &lt;a href=&quot;http://heine.familiedeelstra.com/mycaptcha-download&quot; title=&quot;http://heine.familiedeelstra.com/mycaptcha-download&quot;&gt;http://heine.familiedeelstra.com/mycaptcha-download&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 11 Jun 2007 11:23:06 -0500</pubDate>
 <dc:creator>Jock</dc:creator>
 <guid isPermaLink="false">comment 14199 at http://townx.org</guid>
</item>
<item>
 <title>Hello Jock. To get the RSS</title>
 <link>http://townx.org/blog/elliot/upgrading-from-drupal-4-to-drupal-5#comment-14196</link>
 <description>&lt;p&gt;Hello Jock. To get the &lt;span class=&quot;caps&quot;&gt;RSS &lt;/span&gt;feed link on individual nodes, I added a function to the end of the modules/commentrss/commentrss.module file (inside the &lt;span class=&quot;caps&quot;&gt;PHP &lt;/span&gt;block) which looks like this:&lt;/p&gt;



&lt;pre&gt;
function commentrss_link($type, $node = 0, $main) {
  $links = array();

  if ($type == &#039;node&#039;) {
    $links[&#039;comments_rss&#039;] = array(&#039;href&#039; =&amp;gt; &#039;crss/node/&#039;.$node-&amp;gt;nid, &#039;title&#039; =&amp;gt; &#039;comments RSS&#039;, &#039;attributes&#039; =&amp;gt; array(&#039;title&#039; =&amp;gt; t(&#039;RSS feed of comments on this post&#039;)));
  }

  return $links;
}
&lt;/pre&gt;



&lt;p&gt;I seem to remember that&#039;s all you need to do. NB this works with version 1.12 of the module, but might not work with the latest one (I haven&#039;t checked).&lt;/p&gt;</description>
 <pubDate>Mon, 11 Jun 2007 04:19:35 -0500</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">comment 14196 at http://townx.org</guid>
</item>
<item>
 <title>Any chance...</title>
 <link>http://townx.org/blog/elliot/upgrading-from-drupal-4-to-drupal-5#comment-14191</link>
 <description>&lt;p&gt;...of publishing the modification to the CommentRSS module to get comment feed links into nodes, please?&lt;/p&gt;</description>
 <pubDate>Sun, 10 Jun 2007 06:31:43 -0500</pubDate>
 <dc:creator>Jock</dc:creator>
 <guid isPermaLink="false">comment 14191 at http://townx.org</guid>
</item>
<item>
 <title>Upgrading from Drupal 4 to 5</title>
 <link>http://townx.org/blog/elliot/upgrading-from-drupal-4-to-drupal-5</link>
 <description>&lt;p&gt;Since I&#039;ve upgraded townx.org, I also had to upgrade &lt;a href=&quot;http://moochlabs.com/&quot;&gt;mooch labs&lt;/a&gt; and &lt;a href=&quot;http://railswm.org/&quot;&gt;Rails West Midlands&lt;/a&gt;. I&#039;ve finished this now.&lt;/p&gt;

&lt;p&gt;By the way, upgrading from Drupal 4 to Drupal 5 wasn&#039;t as straightforward as I&#039;d like. The database upgrades worked for my two simple sites, but I rebuilt the database from scratch for this site, as things didn&#039;t quite seem to work when I tried to run update.php. Not sure why. So here was my process:&lt;/p&gt;


&lt;ul&gt;
&lt;li&gt;Set up staging.townx.org (domains, new web space etc.).&lt;/li&gt;
&lt;li&gt;Put an entry in /etc/hosts to point to staging.townx.org (so I don&#039;t have to wait for &lt;span class=&quot;caps&quot;&gt;DNS &lt;/span&gt;propagation).&lt;/li&gt;
&lt;li&gt;Copied Drupal 5 install to the staging.townx.org directory.&lt;/li&gt;
&lt;li&gt;Copied existing database to townxstaging database.&lt;/li&gt;
&lt;li&gt;Set up connections in sites/staging.townx.org/settings.php to point at townxstaging database.&lt;/li&gt;
&lt;li&gt;Ran update.php on staging.townx.org (NB you have to set &lt;tt&gt;$access_check = &lt;span class=&quot;caps&quot;&gt;TRUE&lt;/span&gt;&lt;/tt&gt; in that file for the script to run). A few things didn&#039;t work, possibly because I had a non-standard theme, so a lot of my theme settings didn&#039;t work and the page went blank. &lt;strong&gt;Tip:&lt;/strong&gt; If you&#039;re upgrading an existing site, set the theme to Bluemarine before you start upgrading. But my database structure did get altered properly.&lt;/li&gt;
&lt;li&gt;Created another clean database, townxstaging2, pointed settings.php at that, then ran the Drupal install script to create the database structure. staging.townx.org now contained a blank, default Drupal install.&lt;/li&gt;
&lt;li&gt;Manually installed the modules I need by downloading the versions for Drupal 5 from &lt;a href=&quot;http://drupal.org&quot; title=&quot;http://drupal.org&quot;&gt;http://drupal.org&lt;/a&gt;.  These are the modules I use:
&lt;ul&gt;
&lt;li&gt;Textile: there&#039;s not a release for Drupal 5, but &lt;span class=&quot;caps&quot;&gt;CVS HEAD &lt;/span&gt;version with a &lt;a href=&quot;http://drupal.org/node/97349&quot;&gt;patch&lt;/a&gt; works fine.&lt;/li&gt;
&lt;li&gt;Pathauto: available for Drupal 5.&lt;/li&gt;
&lt;li&gt;Captcha: available for Drupal 5.&lt;/li&gt;
&lt;li&gt;CommentRSS: available for Drupal 5. I added my own modification to put links onto nodes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Manually copied over data from a whole slew of tables from townxstaging to townxstaging2 (note that as I&#039;d updated townxstaging, the tables were in the right format for import; this won&#039;t work if you&#039;re trying to directly import from a Drupal 4 to a Drupal 5 database):
&lt;ul&gt;
&lt;li&gt;blocks: I recreated all the blocks from scratch.&lt;/li&gt;
&lt;li&gt;boxes: Again, I recreated blocks from scratch, cutting and pasting the text for the boxes I need from my old Drupal to my new one (I really should turn them into one or more modules, probably). &lt;a href=&quot;http://www.text-link-ads.com/?ref=21709&quot;&gt;Text Link Ads&lt;/a&gt; only points you at the Drupal module now, which isn&#039;t available for Drupal 5 yet. So I copied over my old box code and modified it a bit to fit the Garland theme.&lt;/li&gt;
&lt;li&gt;comments: these imported fine.&lt;/li&gt;
&lt;li&gt;files, file_revisions: These worked fine. I also needed to copy my &lt;tt&gt;files&lt;/tt&gt; directory from my old install into the new one.&lt;/li&gt;
&lt;li&gt;filters, filter_formats: I had to reconfigure all of my input formats. However, as my nodes still referenced the old IDs for the filter formats, I had to manually fix the IDs in the filter_formats table.&lt;/li&gt;
&lt;li&gt;menu: This transferred over fine.&lt;/li&gt;
&lt;li&gt;node, node_comment_statistics, node_revisions: This caused the most hassle, as the ordering of fields in the table has changed between versions. &lt;strong&gt;Tip:&lt;/strong&gt; If you are dumping data out of node_revisions using phpmyadmin, make sure you dump using complete inserts, as this includes the field names in the &lt;span class=&quot;caps&quot;&gt;INSERT &lt;/span&gt;statements. Note that you also need to set something in the log field for each record: &lt;span class=&quot;caps&quot;&gt;NULL &lt;/span&gt;won&#039;t do. So during the export I set the log field to &#039;&#039; for all nodes where the log field wasn&#039;t set.&lt;/li&gt;
&lt;li&gt;sequences: I imported these &lt;span class=&quot;caps&quot;&gt;OK. &lt;/span&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Make sure any settings in your new database are overwritten by settings from your old database. Otherwise you get weird insert errors, as Drupal will try to reuse IDs that already exist.&lt;/li&gt;
&lt;li&gt;system: In the end, I recreated this from scratch, and didn&#039;t use any of my old settings. This meant quite a bit of hassle, but it did give my system settings a much-needed spring clean.&lt;/li&gt;
&lt;li&gt;term_*, vocabulary_*: I just imported all of these.&lt;/li&gt;
&lt;li&gt;url_alias: Imported fine.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Note that I ignored watchdog, session, cache_* etc. (ephemeral stuff). I also ignored &lt;tt&gt;variables&lt;/tt&gt;, and just recreated that through the &lt;span class=&quot;caps&quot;&gt;GUI.&lt;/span&gt; Some things I don&#039;t use (like contact, forum), so I ignored them. I ignored &lt;tt&gt;history&lt;/tt&gt; too, which you might not be able to do on a site with multiple users.&lt;/li&gt;
&lt;li&gt;Manually copied my modifications to the page template into the Garland theme. These include some &amp;lt;meta&amp;gt; tags, and some Javascript to run my &lt;a href=&quot;http://blogbeat.net/&quot;&gt;Blogbeat&lt;/a&gt; monitoring.&lt;/li&gt;
&lt;li&gt;Copy my modified .htaccess file (to run under &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; 5 and redirect some domain names onto others).&lt;/li&gt;
&lt;li&gt;Once I had staging.townx.org running properly, I moved my old site out the way, moved staging into its place, renamed a few databases, and hey presto, it seems to be working fine.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;There were other bits and pieces I&#039;ve probably missed, but that about sums it up.&lt;/p&gt;</description>
 <comments>http://townx.org/blog/elliot/upgrading-from-drupal-4-to-drupal-5#comments</comments>
 <category domain="http://townx.org/tech">tech</category>
 <pubDate>Fri, 09 Feb 2007 04:52:48 -0600</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">602 at http://townx.org</guid>
</item>
</channel>
</rss>
