Posted by webchick on July 7, 2006 at 5:06pm
3 followers
| Project: | Drupal core |
| Version: | 6.x-dev |
| Component: | base system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | webchick |
| Status: | needs work |
Issue Summary
It's also not uncommon to do a website for example.com and name the theme "example" since it's for example.com, and a custom module with site-specific customizations "example" as well. However, doing this causes conflicts. The one we ran into today was with help text, which would spew out:
warning: Missing argument 1 for example_help() in \modules\example.module on line 12.
You can give $section a default value of NULL to get it to stop doing that, but then no help will display anywhere on the site.
This might be a "Well then don't do that!" problem, but it was very confusing trying to track this down so I figured I'd mention this.
Comments
#1
This happened to me again tonight so I looked more into it, and hit a "duh" moment. :P
Of course they can't be named the same; When PHPTemplate encounters a theme('something') call, it first attempts:
current_theme_something()then
phptemplate_something()and finally
theme_something()So when phptemplate.engine is calling theme('help') in a theme called "foo", it's interfering with foo_help in foo.module, which is a help hook.
Attached patch renames theme_help to theme_help_message to stop this from happening.
#2
Talked to drumm... since this is an API change, it won't get in the 5.0 release cycle, so changing status to "postponed" so I can re-roll when HEAD opens up again.
#3
I forgot about this again until just tonight. :) Hopefully can get it in pre-code-freeze this time. ;)
#4
This one caught me too.
I agree it's natural to have a theme and module named the same thing.
#5
I've no idea why this isn't working. I must be missing something silly. Any ideas?
#6
Is there any interest in this issue?