<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="https://embiggen.net"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>embiggen - drupal</title>
 <link>https://embiggen.net/category/tags/drupal</link>
 <description></description>
 <language>en</language>
<item>
 <title>How to fix &quot;Call to undefined function phptemplate_get_ie_styles()&quot; error when running Drupal&#039;s update.php</title>
 <link>https://embiggen.net/post/how-fix-call-undefined-function-phptemplategetiestyles-error-when-running-drupals-updatephp</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;When running the update script on a new a new installation of Drupal version 6.20, I was getting this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;!--[if lt IE 7]--&amp;gt; Fatal error: Call to undefined function phptemplate_get_ie_styles() in htdocs/themes/garland/maintenance-page.tpl.php on line 23 &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The problem turned out be that the .info file was missing for the Minnelli theme, and that&#039;s the default theme for the maintenance page. I&#039;m not sure how it went missing, but I just copied minnelli.info from a different Drupal installation into the themes/garland/minnelli/ directory and all was well.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Tags:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/tags/development&quot;&gt;development&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/category/tags/drupal&quot;&gt;drupal&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 24 Mar 2011 15:35:24 +0000</pubDate>
 <dc:creator>jrb</dc:creator>
 <guid isPermaLink="false">615 at https://embiggen.net</guid>
 <comments>https://embiggen.net/post/how-fix-call-undefined-function-phptemplategetiestyles-error-when-running-drupals-updatephp#comments</comments>
</item>
<item>
 <title>How to keep Drupal from caching a page</title>
 <link>https://embiggen.net/post/how-keep-drupal-caching-page</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;I ran across a problem on a site today where some custom voting code had stopped working correctly.  Eventually, I figured out that the actual problem was due to the page being cached, so it wasn&#039;t showing the updated results.  I didn&#039;t want to turn off caching so, my next step was to figure out how to turn caching off for a particular page.  The Google found &lt;a href=&quot;http://drupal.org/project/cacheexclude&quot;&gt;CacheExclude&lt;/a&gt;, a module that allows you to do just that-- turn caching off for specific pages. &lt;/p&gt;
&lt;p&gt;That module did the job, but I wanted to know exactly how it worked.  Looking at the source, the &quot;magic&quot; was basically a single line:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$GLOBALS[&#039;conf&#039;][&#039;cache&#039;] = false;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In my case, the pages in question were created by custom code, so I just added that line to my code rather than adding another module. That will prevent Drupal from caching the page.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Tags:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/tags/drupal&quot;&gt;drupal&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/category/tags/dev&quot;&gt;dev&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Mon, 18 Oct 2010 20:44:20 +0000</pubDate>
 <dc:creator>jrb</dc:creator>
 <guid isPermaLink="false">455 at https://embiggen.net</guid>
 <comments>https://embiggen.net/post/how-keep-drupal-caching-page#comments</comments>
</item>
<item>
 <title>A fix for Drupal form error messages not showing up</title>
 <link>https://embiggen.net/post/fix-drupal-form-error-messages-not-showing</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;I was having a problem with using the Login block form on the home page.  Error messages related to the login (e.g. &quot;Password incorrect.&quot;, etc.) were not getting dispalyed when the login failed.  They would show up only after reloading the page again. &lt;/p&gt;
&lt;p&gt;In my template, I had this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;div class=&quot;content&quot;&amp;gt;&lt;br /&gt;
	    &amp;lt;?php print drupal_get_form(&#039;user_login_block&#039;); ?&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;What I figured out was that the error messages weren&#039;t actually being generated until &lt;em&gt;after&lt;/em&gt; the call to drupal_get_form() was made.  Because this call was inside the template, they were not set for the template to display.&lt;/p&gt;
&lt;p&gt;The fix for this is to create a function to make the call to drupal_get_form() and grab the resulting error messages (if any).  So, in a module or in template.php, you need to create a function like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;function THEMENAME_get_login_block() {&lt;br /&gt;
	    $form = drupal_get_form(&#039;user_login_block&#039;);&lt;br /&gt;
	    return theme_status_messages().$form;&lt;br /&gt;
	}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Then, in your template, do this instead:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;div class=&quot;content&quot;&amp;gt;&lt;br /&gt;
	    &amp;lt;?php print THEMENAME_get_login_block() ;?&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This makes sure that the error messages are set before the form and the mesages themselves are displayed.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Tags:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/tags/development&quot;&gt;development&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/category/tags/drupal&quot;&gt;drupal&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 16 Jul 2009 21:07:36 +0000</pubDate>
 <dc:creator>jrb</dc:creator>
 <guid isPermaLink="false">82 at https://embiggen.net</guid>
 <comments>https://embiggen.net/post/fix-drupal-form-error-messages-not-showing#comments</comments>
</item>
<item>
 <title>Fix for very slow Drupal Admin pages</title>
 <link>https://embiggen.net/post/fix-very-slow-drupal-admin-pages</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;On one of the Drupal sites I was developing, admin pages were getting (unbearably) slow-- about 30 seconds to load each page.  Using the Google, I found a couple of articles that pointed the finger at the Update Status module:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://drupal.org/node/331374&quot;&gt;Admin pages hang or are very slow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://drupal.org/node/220278&quot;&gt;Access to administration pages very slow&lt;/a&gt;&lt;br /&gt;
		 &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Looking at the &quot;Recent Log Entries&quot; report, I could see that there was an &quot;Attempted to fetch information about all available new releases and updates&quot; entry for each page view.  This meant that Update Status was checking the status of all my modules &lt;em&gt;with each page load&lt;/em&gt; even though I had it set to check weekly.  That would definitely slow things down a bit!  Deactivating the &quot;Update Status&quot; module fixed the slowdown, but I really wanted to have that functionality.  Turning the module back on, just made the site crawl again.&lt;/p&gt;
&lt;p&gt;What fixed it for me was deactivating the &quot;Update Status&quot; module then uninstalling it from the &quot;Build -&amp;gt; Modules -&amp;gt; Uninstall&quot; tab.  This removes all of its module-related settings from the database.  Then, when I activated &quot;Update Status&quot; again, all was well.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Tags:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/tags/development&quot;&gt;development&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/category/tags/drupal&quot;&gt;drupal&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 09 Jul 2009 17:58:18 +0000</pubDate>
 <dc:creator>jrb</dc:creator>
 <guid isPermaLink="false">63 at https://embiggen.net</guid>
 <comments>https://embiggen.net/post/fix-very-slow-drupal-admin-pages#comments</comments>
</item>
<item>
 <title>I released my first Drupal module today!</title>
 <link>https://embiggen.net/post/i-released-my-first-drupal-module-today</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;It&#039;s &lt;a href=&quot;http://drupal.org/project/contact_hide_email&quot;&gt;Contact Hide Email&lt;/a&gt;... I wrote this code a while back, presented it at a Drupal user group, got a Drupal CVS account, and finally got around to creating an actual release tonight.  What does it do?  Funny you should ask...&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;When an auto-reply is used with the standard contact form, the &quot;From&quot; on the auto-reply email is set to the value entered as the recipient. In some cases (e.g. email to the CEO), it wouldn&#039;t be good to reveal that email address. Using this module, you can choose to hide the recipient&#039;s email in the auto-reply. It will instead come from the default site email address. This can be set separately for each contact form category.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Tags:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/tags/development&quot;&gt;development&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/category/tags/drupal&quot;&gt;drupal&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/tags/php&quot;&gt;php&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 08 Jul 2009 03:33:07 +0000</pubDate>
 <dc:creator>jrb</dc:creator>
 <guid isPermaLink="false">56 at https://embiggen.net</guid>
 <comments>https://embiggen.net/post/i-released-my-first-drupal-module-today#comments</comments>
</item>
</channel>
</rss>
