Patch (to be ported)
Project:
Node clone
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 May 2009 at 15:30 UTC
Updated:
10 May 2011 at 08:29 UTC
Jump to comment: Most recent file
Comments
Comment #1
pwolanin commentedyes, that seems to be what system module is doing (in a pathetically inflexible way)
http://api.drupal.org/api/function/system_init/6
Comment #2
kwinters commentedProvided patch against HEAD, added documentation.
There doesn't appear to be a better way to do this in D6.
Comment #3
pwolanin commentedLooks reasonable - does it work?
Comment #4
kwinters commentedYes. To test, apply the patch, set an admin theme with "Use administration theme for content editing" enabled. Find a node, hit Clone. The theme applied should be the same as for Edit.
If you don't check the content editing box, both Edit and Clone will use the main site theme instead of the admin theme.
Comment #5
tripngroove commentedGreat patch, thanks! Someone needs to merge this in :)
Comment #6
cyberwolf commentedSubscribing.
Comment #7
cyberwolf commentedI used the themekey module to accomplish the same behavior, as a workaround.
In admin/settings/themekey, I added the following rule: drupal:path = node/#/clone
Just mentioning it here in case someone needs it.
Comment #8
pwolanin commentedcomitted to 6.x-1.x. Need to be ported to Drupal 7 version whenever that's ready.
Comment #9
khaled.zaidan commentedI just found an issue regarding this code.
It works fine as long as no other module has already invoked a call to init_theme().
But it is possible that another module's hook_init() might invoke a function from theme.inc which might cause the invokation of init_theme(). init_theme() sets the global variable $theme, and then when it's called again it doesn't execute anything. The simplest fix would be to unset it :)
Attached is a patch for this :)
Comment #10
khaled.zaidan commentedActually i'm not so sure about the patch i submitted in my previous comment. It needs to be verified performance-wise. (could this be causing the theme registry to be rebuilt on every page request?)