Grep on Drupal core reveals:
modules\comment\comment.module(1586): return theme('box', $title, drupal_get_form('comment_form', $edit, $title));
modules\search\search.pages.inc(35): $results = theme('box', t('Search results'), $results);
modules\search\search.pages.inc(38): $results = theme('box', t('Your search yielded no results'), search_help('search#noresults', drupal_help_arg()));
This is one of the most insane theme functions at all. Not even block module uses it for its "boxes", where one would expect it.
Only related/affected issues:
#115540: "no results" page not themeable
#285116: Remove redundant argument for theme_box()
#23584: Introduce theme wrapper, as discussed on the Sprint
| Comment | File | Size | Author |
|---|---|---|---|
| #25 | more-kill-box-372471-25.patch | 678 bytes | johnalbin |
| #10 | jamesan_372471-10.patch | 6.35 KB | JamesAn |
Comments
Comment #1
johnalbinDie! Die! Die!
i.e. +1
Comment #2
sunComment #3
robin monks commented+1, and subscribing.
Comment #4
Zarabadoo commentedI have always wondered what the real purpose of this was. I wholeheartedly agree. +1
Comment #5
jurriaanroelofs commented+1
no more surprise markup from unneeded theme_box implementations.
Comment #6
webchickYep.
Comment #7
wretched sinner - saved by grace commentedOK. I'm keen to give it a go. Can someone point me to what it should be replaced with?
Comment #8
JamesAn commentedI'd recommend creating a theme function in the comment module to handle theme the comment box and another theme function for the search results.
The theme functions need to be registered by hook_theme and then theme_box can be removed.
Comment #9
belshire commented+1 Subscribing. Would love to kill the box.
Comment #10
JamesAn commentedBox has been killed.
I created a theme_search_results_listing() for the search.module and replaced comment_form_box() with a theme_comment_form_box() for the comment.module.
Comment #11
dries commentedCommitted to CVS HEAD. This needs to be documented in the upgrade guide. Mark as 'fixed' after it was documented. Thanks!
Comment #12
JamesAn commentedCool.
Do you mean the 6.x to 7.x theme upgrade page or the http://drupal.org/upgrade/ handbook? I don't know the handbooks very well, but I can document this change if someone can point me somewhere. Thanks.
Comment #13
webchick@JamesAn: Yep, the former: http://drupal.org/node/254940
Comment #14
wretched sinner - saved by grace commentedComment #15
rsm08 commentedYou look like someone who knows how to apply a patch! ;)
So how do you do it? Is there some Drupal module for it, some utility with a GUI, or is it some command line script that I need to execute?!
Also, there must be some utility for actually creating the .patch files as well. Can you direct me to one?
Thanks!
Comment #16
vm commentedhttp://drupal.org/patch/apply = how to work with patches.
Comment #17
rsm08 commentedThanks very!
Comment #18
dvessel commentedStrange.. What's box.tpl.php doing in the system folder? Not sure how it ever got in there when we had the theme function.
Comment #19
johnalbinJoon, I had the same problem with a file in Views. That file was modified in a DRUPAL-5 branch when I ran a
cvs up -AdP(which moved me to HEAD). But it remained in my checkout even though it wasn't in HEAD; worse, it didn't show up as an unknown file in HEAD (with a preceding ? mark). I really hate CVS sometimes. Try deleting modules/system/box.tpl.php and running cvs up again. It should stay removed.I updated the upgrade docs. http://drupal.org/node/254940#box
Comment #20
JamesAn commentedThanks John for updating the docs. I hadn't gotten to it yet.. ^^"
Comment #21
dvessel commentedI must be on the wrong branch. It's listed as "HEAD" for sticky tag. I removed the template, updated and box.tpl.php was pulled back in. I really hate CVS. Always!
Thanks John.
Comment #22
johnalbinOk, I just looked at this again. Joon is right. box.tpl.php really is still in CVS. See: http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/system/
Looks like it wasn't removed: http://drupal.org/cvs?commit=199904
Please remove.
Comment #23
dries commentedDeleted!
Comment #24
sunhttp://api.drupal.org/api/function/drupal_common_theme/7
Who spots the kitten?
Comment #25
johnalbinI do! I do! ;-)
Comment #26
webchickThanks. :)
DIE, box.tpl.php, DIE!!
Comment #27
tstoecklerIs it expected behaviour that block.module still installs the {box} table?
Comment #28
johnalbinYep. But that's a separate issue. The fact that blocks are stored in a box table is unrelated to the issue of removing theme_box/box.tpl.php as block module didn't use those.
Comment #30
lubnax commentedsubscribing
Comment #31
fgmThe upgrade guide has not been updated: the is no mention of a recommended upgrade from theme('box').
Additionally, when done, this issue should be passed on to coder_upgrade (coder.module) as it does not have an upgrade path for theme('box') either.
Comment #32
jhodgdontagging for upgrade guide
Comment #34
jhodgdonThe theme update guide was already updated:
http://drupal.org/node/254940#box
So I guess what is being asked for in #31 is an update to the module update guide... so I added:
http://drupal.org/update/modules/6/7#theme_box