<br><br><div class="gmail_quote">On Tue, Apr 6, 2010 at 3:52 AM, nan wich <span dir="ltr">&lt;<a href="mailto:nan_wich@bellsouth.net">nan_wich@bellsouth.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:12pt"><div></div>
<div>I wouldn&#39;t leave the sites directory out entirely because one may also put hacks into settings.php.<br></div></div></div></blockquote><div><br></div><div><br></div><div> Indeed :) the team keeps 2 settings files here and include the other one from settings.php which has lots of variable definition, web service end point url&#39;s etc. </div>
<div><br></div><div>Thanks</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:12pt">
<div> </div><div class="im">
<p><font face="bookman old style, new york, times, serif" color="#ff007f" size="4"><em><strong>Nancy E. Wichmann, PMP</strong></em></font></p>
<p><font face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</font></p>
<div><br></div>
</div><div style="font-size:12pt;font-family:Courier New, courier, monaco, monospace, sans-serif"><br>
<div style="font-size:10pt;font-family:arial, helvetica, sans-serif"><font face="Tahoma" size="2">
<hr size="1">
<b><span style="font-weight:bold">From:</span></b> Ian Bezanson &lt;<a href="mailto:irb@ianbezanson.ca" target="_blank">irb@ianbezanson.ca</a>&gt;<br><b><span style="font-weight:bold">To:</span></b> <a href="mailto:development@drupal.org" target="_blank">development@drupal.org</a><br>
<b><span style="font-weight:bold">Sent:</span></b> Mon, April 5, 2010 7:16:33 AM<div><div></div><div class="h5"><br><b><span style="font-weight:bold">Subject:</span></b> Re: [development] Getting rid of core hacks for drupal upgrade tohappen. Need tips on the process.<br>
</div></div></font><div><div></div><div class="h5"><br>I&#39;ve only been loosely following this thread, so my apologies if I&#39;m repeating what anyone else has suggested already.  Although I will do anything and everything possible to avoid hacking core, there is one project I&#39;ve been involved in where it simply was impossible to avoid.  This setup was running on 5.7 (IIRC) for over a year with no patching done, and was a growing concern.<br>
<br>Here&#39;s what I did:<br><br>1. Setup a mirrored test environment of your live site somewhere that you can <br>  mess it up without taking
 your site down.<br>2. Open a text editor of choice and mark detailed examples of everything else <br>  you find, so that your move to production is as smooth as possible.<br>3. Grab the base install of your version of Drupal <br>
  (e.g. <a href="http://ftp.drupal.org/files/projects/drupal-6.2.tar.gz" target="_blank">http://ftp.drupal.org/files/projects/drupal-6.2.tar.gz</a>) and untar it <br>  in another directory.<br>4. Get a good diff program.  If using *nix, try running something like:<br>
    $ diff -q your_dev_site drupal-5.2 | grep -v sites<br>  This should present you with a list of files that aren&#39;t the same, excluding<br>  anything under sites (which will - without a doubt - differ).<br>5. One-by-one note the differences between each core file and your own.  <br>
  Provided you have downloaded the proper core version in Step 3, this should<br>  give you a comprehensive list of what you have changed.<br>6. Download the newest version of Drupal you wish to use (if you&#39;re doing
 a <br>  major version upgrade, the rest of this is likely going to be a massive pain<br>  in the butt) and apply the hacks to the new code (if they are still necessary).<br>  This step isn&#39;t going to be 100% straightforward, as line 123 in file a, won&#39;t<br>
  necessarily be the same line in the newest version of the same file (hey, new<br>  releases come for a reason).  If you hacked the code in the first place, you&#39;ll<br>  have to use some common sense when folding code back together.<br>
7. Once the new code has been re-hacked, follow the Drupal upgrade path with said<br>  code.<br><br>If you&#39;ve hacked contrib modules, rinse and repeat the general procedure for each of those.  The last time that I&#39;d done a major upgrade of the site in question, I looked for any area possible where each hack could be removed in lieu of a better &quot;Drupal&quot; approach.  I was not able to remove all, but some at least. 
 Obviously, it is less than ideal to be running other than core, but I understand that sometimes it just needs to happen.  In my case, I was able to safely upgrade a site that sees 30k-60k unique visits/day in less than a day&#39;s effort.  It takes time, but if you do it right it won&#39;t be as complicated as you may expect.<br>
<br>I hope this helps,<br><br>--<br>Ian Bezanson<br><a href="mailto:irb@ianbezanson.ca" target="_blank">irb@ianbezanson.ca</a><br><br><br><br>On 2010-04-04, at 2:14 PM, FGM wrote:<br><br>&gt; Dipen,<br>&gt; <br>&gt; I&#39;m working on very much the same predicament these days, except it&#39;s a slightly more recent version than 5.2 but with much the same problem (upgrade to 5.22 then 6). Maybe we could both save some time by working together on our respective problems with similar scripts/methods, and possibly come back to the community once we&#39;re done on how we did it. ? Feel free to contact me directly if this is
 of interest to you.<br>&gt; <br>&gt; I&#39;m answering on the dev. list because others might indeed be currently in the same predicament and we could probably all benefit from pooling our ideas on such problems, which are likely to become more frequent overall, since D5 was the first version which saw significant for-hire developments, most of them likely to have much the same kind of issues. And going out of support when D7 is released, real soon now :-)<br>
&gt; <br>&gt; Frederic G. MARAND<br>&gt; OSInet<br>&gt; <br>&gt; ----- Original Message ----- From: &quot;nan wich&quot; &lt;<a href="mailto:nan_wich@bellsouth.net" target="_blank">nan_wich@bellsouth.net</a>&gt;<br>&gt; To: &lt;<a href="mailto:development@drupal.org" target="_blank">development@drupal.org</a>&gt;<br>
&gt; Sent: Sunday, April 04, 2010 7:04 PM<br>&gt; Subject: Re: [development] Getting rid of core hacks for drupal upgrade tohappen. Need tips on the
 process.<br>&gt; <br>&gt; <br>&gt; Indeed, I have to echo this sentiment. Many years ago, in a previous life, I was a systems programmer on large IBM mainframes. It was quite common practice then to hack the operating system. There were a few &quot;hooks&quot; but many times those were simply inadequate to do what some people thought were good ideas.<br>
&gt; <br>&gt; As time went on, it became a major challenge (as in hassle) to update the operating system. Some companies had armies of systems programmers just to maintain these hacks. I don&#39;t know if any ever actually sat down and figured out if they were really worth what they were spending to keep those hacks in place.<br>
&gt; <br>&gt; But I did when I went to a new job where the system hadn&#39;t been updated in four years and new computers that were on order (it could take 2 years then) made it mandatory to do so. As I began working on the hacks that were in place - and poorly documented, if at all - I realized
 that some were really not worth keeping and others could be reworked in such a way that they used real hooks.<br>&gt; <br>&gt; All through this process I kept hearing &quot;we&#39;ve always done it that way.&quot; On the day we cut over to the new operating system (it was a big deal then), I had a tee-shirt made that said &quot;We aren&#39;t going to do it that way any more.&quot;<br>
&gt; <br>&gt; Words to live by: &quot;NO core hacks!&quot;<br>&gt; More words to live by: &quot;No PHP pages!&quot;<br>&gt; It&#39;s not just words to live by - it&#39;s religion.<br>&gt; <br>&gt; <br>&gt; Nancy E. Wichmann, PMP<br>
&gt; <br>&gt; Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.<br>&gt; <br>&gt; <br>&gt; ________________________________<br>&gt; From: Yuval Hager <a href="mailto:yhager@yhager.com" target="_blank">yhager@yhager.com</a>&lt;mailto:<a href="mailto:yhager@yhager.com" target="_blank">yhager@yhager.com</a>&gt;<br>
&gt; <br>&gt; So before
 you dive in, if you are in position to, consider to make this a make<br>&gt; D6 or break decision to the customer.<br>&gt; <br>&gt; <br><br></div></div></div></div></div></div></blockquote></div><br>