This occurs when you enable a separate theme for the administration section and enable "Use administration theme for content editing" (via Site Configuration > Administration Theme). The node creation and node editing pages use the separate administration theme just like anything under admin/*. However, when you go to delete a node, the confirm screen that displays does not use the administration theme. As you can see from my patch, the logic that determines what theme to use only handles for the edit and add options; I added 'delete' as another option.

P.S. Not sure if my patch will apply, my local CVS repo is misbehaving right now. It's a simple patch if someone needs to roll another.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

robynover’s picture

I tried this and it got me part-way there. I got the admin theme but no longer go the confirmation form.

Here was my solution, maybe it will help someone:

I'm using the Admin module as my admin theme, and I added code in admin.module around line 30:

	if(arg(2) == 'delete' && arg(0) == 'node'){
		module_load_include('inc', 'admin', 'admin.theme');
	    _admin_init_theme();
	}

It treats node delete pages as admin pages. It's hacky but it works.

robynover’s picture

If you're not using the admin module, you could probably do something similar in your own module, using the same if statement and

$custom_theme = variable_get('admin_theme', '0');

as in the patch above

Status: Needs review » Needs work

The last submitted patch, admin_theme_delete.patch, failed testing.

squarecandy’s picture

Version: 6.15 » 6.20

I know this thread is 10 months old - but this is still an issue in 6.20 core. I just applied the suggested change in the patch manually - works great! Sorry I haven't quite figured out the patch thing yet... this one's so simple, maybe I'll give it a shot tomorrow.

squarecandy’s picture

Status: Needs work » Needs review
FileSize
804 bytes

see if this patch is better...

Status: Needs review » Needs work

The last submitted patch, admin_theme_delete_02.patch, failed testing.

Michael Zetterberg fd. Lopez’s picture

The patch fixes it for me too.
Re-rolled against 6.x

Michael Zetterberg fd. Lopez’s picture

Version: 6.20 » 6.x-dev
Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, admin-theme-on-content-delete-672370-7.patch, failed testing.

Michael Zetterberg fd. Lopez’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, admin-theme-on-content-delete-672370-7.patch, failed testing.

elimuir’s picture

The former patch from comment #7 was missing close parentheses after 'delete'.

Re-rolled patch with fix.

elimuir’s picture

Status: Needs work » Needs review

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.