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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JohnAlbin’s picture

Die! Die! Die!

i.e. +1

sun’s picture

Issue tags: +Novice
Robin Monks’s picture

+1, and subscribing.

Zarabadoo’s picture

I have always wondered what the real purpose of this was. I wholeheartedly agree. +1

JurriaanRoelofs’s picture

+1
no more surprise markup from unneeded theme_box implementations.

webchick’s picture

Yep.

wretched sinner - saved by grace’s picture

OK. I'm keen to give it a go. Can someone point me to what it should be replaced with?

JamesAn’s picture

I'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.

belshire’s picture

+1 Subscribing. Would love to kill the box.

JamesAn’s picture

Status: Active » Needs review
FileSize
6.35 KB

Box 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.

Dries’s picture

Status: Needs review » Needs work

Committed to CVS HEAD. This needs to be documented in the upgrade guide. Mark as 'fixed' after it was documented. Thanks!

JamesAn’s picture

Cool.

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.

webchick’s picture

@JamesAn: Yep, the former: http://drupal.org/node/254940

wretched sinner - saved by grace’s picture

Issue tags: +Needs documentation
rsm08’s picture

You 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!

VM’s picture

http://drupal.org/patch/apply = how to work with patches.

rsm08’s picture

Thanks very!

dvessel’s picture

Strange.. What's box.tpl.php doing in the system folder? Not sure how it ever got in there when we had the theme function.

JohnAlbin’s picture

Status: Needs work » Fixed

Joon, 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

JamesAn’s picture

Thanks John for updating the docs. I hadn't gotten to it yet.. ^^"

dvessel’s picture

I 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.

JohnAlbin’s picture

Status: Fixed » Reviewed & tested by the community

Ok, 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.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Deleted!

sun’s picture

Status: Fixed » Active
JohnAlbin’s picture

Status: Active » Needs review
FileSize
678 bytes

I do! I do! ;-)

webchick’s picture

Status: Needs review » Fixed

Thanks. :)

DIE, box.tpl.php, DIE!!

tstoeckler’s picture

Is it expected behaviour that block.module still installs the {box} table?

JohnAlbin’s picture

Is it expected behaviour that block.module still installs the {box} table?

Yep. 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

lubnax’s picture

subscribing

fgm’s picture

Status: Closed (fixed) » Active

The 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.

jhodgdon’s picture

tagging for upgrade guide

jhodgdon’s picture

Status: Active » Fixed

The 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

Status: Fixed » Closed (fixed)
Issue tags: -Needs documentation, -DrupalWTF, -Needs documentation updates

Automatically closed -- issue fixed for 2 weeks with no activity.