Skip to content

Commit

Permalink
remove some duplicate posts
Browse files Browse the repository at this point in the history
  • Loading branch information
zroger committed Jun 6, 2011
1 parent fd4363e commit e8fcb77
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 292 deletions.
21 changes: 0 additions & 21 deletions _posts/2009-07-22-drupal-theme-and-module-naming-conflicts

This file was deleted.

21 changes: 18 additions & 3 deletions _posts/2009-07-22-drupal-theme-and-module-naming-conflicts.md
@@ -1,6 +1,21 @@
---
---
layout: post
title: Drupal theme and module naming conflicts
created: 1248314152
categories:
- development
- drupal
- theming
disqus_id: node/28
---
<p>Andrew was having a problem earlier today with a theme's preprocess function not being called in the order he expected.  In particular, this function was a THEMENAME_preprocess_node() function.  The odd thing was, that when he looked at the theme registry using the handy devel module, the order of preprocess functions was</p><ul><li>THEMENAME_preprocess_node()</li><li>views_preprocess_node()</li><li>phptemplate_preprocess_node()</li></ul><p>The phptemplate_preprocess_node function is found in the base theme, so that didn't look out of place.  I then realized that the themes preprocess function was being called amongst a bunch of module preprocess functions.  That's when the light bulb went off in my head.</p><p>It turns out that there was also a module with the same name as the theme.  Since php has only a single namespace, THEMENAME_preprocess_node() was interpreted as MODULENAME_preprocess_node(). Yikes!!!</p><p>Let's get this fixed in Drupal 7.  There is already an <a href="http://drupal.org/node/371375">issue</a> in the Drupal issue queue to handle these naming conflicts.</p><p> </p>

Andrew was having a problem earlier today with a theme's preprocess function not being called in the order he expected. In particular, this function was a THEMENAME_preprocess_node() function. The odd thing was, that when he looked at the theme registry using the handy devel module, the order of preprocess functions was:

1. THEMENAME_preprocess_node()
2. views_preprocess_node()
3. phptemplate_preprocess_node()

The phptemplate_preprocess_node function is found in the base theme, so that didn't look out of place. I then realized that the themes preprocess function was being called amongst a bunch of module preprocess functions. That's when the light bulb went off in my head.

It turns out that there was also a module with the same name as the theme. Since php has only a single namespace, THEMENAME_preprocess_node() was interpreted as MODULENAME_preprocess_node(). Yikes!!!

Let's get this fixed in Drupal 7. There is already an <a href="http://drupal.org/node/371375">issue</a> in the Drupal issue queue to handle these naming conflicts.
17 changes: 0 additions & 17 deletions _posts/2009-10-27-is-it-drupal.md

This file was deleted.

16 changes: 0 additions & 16 deletions _posts/2010-02-03-dialog-api.markdown

This file was deleted.

16 changes: 0 additions & 16 deletions _posts/2010-02-04-worldwide-drupal-happy-hour.markdown

This file was deleted.

107 changes: 0 additions & 107 deletions _posts/2010-12-16-ajax-modal-windows.html

This file was deleted.

112 changes: 0 additions & 112 deletions _posts/2010-12-16-ajax-modal-windows.md

This file was deleted.

0 comments on commit e8fcb77

Please sign in to comment.