Khaled's solution seems to be the most logical. By enforcing that only one or the other be enabled we can avoid many problems. I can imagine a newbie doing something like that to find himself very confused from the result.
<br><br>Furthermore, without really diving into the core, there's almost no way to figure out what's going on or to figure out that it has anything to do with a module/theme name conflict. We'd be getting loads of issues that simply can't be duplicated. If no one has any better ideas then I'll try to implement a patch for this. Thanks.
<br><br><div><span class="gmail_quote">On 4/26/07, <b class="gmail_sendername">Larry Garfield</b> <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
When I setup our automated install scripts at work for creating new Drupal<br>projects, I specifically set it up to have a site-specific module named<br><sitename> and a theme named <sitename>theme. Since the majority of the code
<br>in <sitename>theme/template.php has a phptemplate_ prefix anyway, it's not<br>really that weird to type.<br><br>Option 1 is the current standard, since PHP doesn't offer true namespacing and<br>I don't think it's expected to for the foreseeable future. If writing your
<br>own code, keeping in mind potential permutations of the things you name is<br>probably a good idea for that reason.<br><br>On Wednesday 25 April 2007 5:41 pm, Ashraf Amayreh wrote:<br>> Hello all,<br>><br>> I ran into a very awkward bug today. I created a module and a theme for a
<br>> client, and naturally, this module contained customizations and the theme<br>> was a custom made theme. I named the module and the theme with the client's<br>> name. Let's say the client was named abc so I created an abc module and an
<br>> abc theme. When I implemented the abc_block hook I was surprised to find<br>> that all blocks disappeared on all pages. Further investigation into the<br>> core and I found that the culprit was the call to theme('block') which
<br>> mistakingly called abc_block thinking it was a theme override function<br>> (rather than the hook it was).<br>><br>> I was wondering if this issue has been addressed before. I can think of<br>> three possible solutions:
<br>> 1. Make it a standard that no theme and module should be named the same<br>> (weak solution)<br>> 2. Change all theme('block') calls to something else so no chance of<br>> conflict could occur<br>
> 3. Change the hook name so that it won't conflict with the theme call<br>> 4. Any suggestions???<br>><br>> Either 2 or 3 seem good enough to solve the problem. But I thought I'd<br>> gouge some opinions before wasting time on a less-than-optimal patch.
<br>><br>> Thanks :-)<br><br>--<br>Larry Garfield AIM: LOLG42<br><a href="mailto:firstname.lastname@example.org">email@example.com</a> ICQ: 6817012<br><br>"If nature has made any one thing less susceptible than all others of
<br>exclusive property, it is the action of the thinking power called an idea,<br>which an individual may exclusively possess as long as he keeps it to<br>himself; but the moment it is divulged, it forces itself into the possession
<br>of every one, and the receiver cannot dispossess himself of it." -- Thomas<br>Jefferson<br></blockquote></div><br>