Everybody has given excellent suggestions regarding how to change a module&#39;s weight, but please do note the original question, as well as Nancy&#39;s follow up.  She is not asking about how to set a module&#39;s weight, and obviously knows how to do this as she altered her module&#39;s weight intentionally and for (presumably) good reason.  The question is about setting one of the $variable array elements within a theme_preprocess hook.<br>
<br>Sorry Nancy, I don&#39;t have an answer for you.  It sounds as though your suspicion is correct that because your code is being called before the node module&#39;s code, it is getting overwritten at that level.  Maybe you could break out your preprocess function into a separate module space so that you can keep your -2 weighting for your base module but the section that needs to run after node.module is done its business could be at an unaltered weight.  Not the cleanest solution, certainly .. and it may not work in your context depending on what you are doing.<br>
<br>Best,<br>William<br><br><div class="gmail_quote">On Fri, Jul 24, 2009 at 2:31 PM, Jim Taylor <span dir="ltr">&lt;<a href="mailto:jim@rootyhollow.com">jim@rootyhollow.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<a href="http://drupal.org/project/util" target="_blank">http://drupal.org/project/util</a><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Fri, Jul 24, 2009 at 2:22 PM, Peter Droogmans <span dir="ltr">&lt;<a href="mailto:Peter@attiks.com" target="_blank">Peter@attiks.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">








<div link="blue" vlink="purple" lang="NL-BE">

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">The weight of modules can be found in the system table</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<div>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">

<p><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> <a href="mailto:development-bounces@drupal.org" target="_blank">development-bounces@drupal.org</a>
[mailto:<a href="mailto:development-bounces@drupal.org" target="_blank">development-bounces@drupal.org</a>] <b>On Behalf Of </b><a href="mailto:nan_wich@bellsouth.net" target="_blank">nan_wich@bellsouth.net</a><br>
<b>Sent:</b> vrijdag 24 juli 2009 18:40<br>
<b>To:</b> development<br>
<b>Subject:</b> SPAM --- [development] Howto: Override $node_url in theme</span></p>

</div>

</div>

<p> </p>

<table style="width: 100%;" border="0" cellpadding="0" cellspacing="0" width="100%">
 <tbody><tr style="height: 30pt;">
  <td colspan="3" style="padding: 0cm; height: 30pt;">
  <p> </p>
  </td>
 </tr>
 <tr style="height: 225pt;">
  <td style="padding: 0cm; width: 30pt; height: 225pt;" width="40">
  <p> </p>
  </td>
  <td style="padding: 0cm; height: 225pt;" valign="top">
  <div>
  <p><span style="font-size: 9.5pt; color: rgb(51, 0, 102);">My module implements template_preprocess_hook, but when it
  fires, the $variables[&#39;node_url&#39;] is not set yet. I have gone through the
  themong guide and tried just about every preprocess hook there is and none of
  them has that variable set when I get control.</span></p>
  </div>
  <div>
  <p><span style="font-size: 9.5pt; color: rgb(51, 0, 102);"> </span></p>
  </div>
  <div>
  <p><span style="font-size: 9.5pt; color: rgb(51, 0, 102);">It is set in theme.inc in template_preprocess_node, without
  regard as to whether or not it is already set. I even tried
  mymodule_preprocess_node, and it is still not set there.</span></p>
  </div>
  <div>
  <p><span style="font-size: 9.5pt; color: rgb(51, 0, 102);"> </span></p>
  </div>
  <div>
  <p><span style="font-size: 9.5pt; color: rgb(51, 0, 102);">The problem may be because my module&#39;s weight is -2 due to a
  timing problem with the user module. So I am probably getting called before
  node.module too.</span></p>
  </div>
  <div>
  <p><span style="font-size: 9.5pt; color: rgb(51, 0, 102);"> </span></p>
  </div>
  <div>
  <p><span style="font-size: 9.5pt; color: rgb(51, 0, 102);">So how can I change that value?</span></p>
  </div>
  <div>
  <p><span style="font-size: 9.5pt; color: rgb(51, 0, 102);"> </span></p>
  </div>
  <div>
  <p><span style="font-size: 9.5pt; color: rgb(51, 0, 102);">--<br>
  Nancy E. Wichmann, PMP <br>
  <br>
  Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King,
  Jr.</span></p>
  </div>
  </td>
  <td style="padding: 0cm; width: 30pt; height: 225pt;" width="40">
  <p> </p>
  </td>
 </tr>
</tbody></table>

<p> </p>

</div>

</div>


</blockquote></div><br><br></div></div><blockquote style="margin: 1.5em 0pt;">-- <br>
Jim Taylor <br>
Rooty Hollow LLC, Owner <br>
<a href="mailto:jim@rootyhollow.com" target="_blank">jim@rootyhollow.com</a> <br>
<a href="http://www.rootyhollow.com" target="_blank">www.rootyhollow.com</a><br>
(614) 432-8609<br>
<br>
Twitter: jalama<br>
Linkedin: <a href="http://www.linkedin.com/in/rootyhollow" target="_blank">http://www.linkedin.com/in/rootyhollow</a></blockquote>
</blockquote></div><br>