Closed (fixed)
Project:
Theme developer
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Mar 2010 at 13:21 UTC
Updated:
18 Oct 2011 at 04:58 UTC
Jump to comment: Most recent file
Comments
Comment #1
squarecandy commentedI miss this too! Where is it?
Comment #2
ccshannon commentedThough I greatly appreciate this incredible module, I am most unhappy about this change.
Given that Theme Developer breaks a lot of pages when it is active, I only use it for a few seconds at a time. It is a great annoyance to have to keep a separate tab open to the modules form to have to enable/disable this. Before, i had this toggle available to me at all times, right on the page, using Simplemenu or the Devel block.
This slows me down and adds time to my work.
Please put back this functionality as soon as is humanly possible. I consider its disappearance form the Devel block, a step backward. Thanks.
Comment #3
effulgentsia commentedAgreed that this is a bug, and it is a casualty of separating the project from the rest of Devel. But the separation was needed, because Moshe, the maintainer of Devel, didn't have time to continue maintaining Theme Developer. I'll work on restoring this functionality.
Comment #4
ccshannon commentedThank you. Much appreciated! :)
Comment #5
gstout commentedWaiting for new release, truly, losing that link is debilitating to my theme dev speed. Thanks effulgentsia, looking forward to your fix.
Comment #6
Dr00py commentedHi guys.
For all of you that you are missing that toggle link, here is a "quick and dirty" patch for Devel module (not Theme developer), that will bring it back (shamelessly copied from a previous version of Devel). This has to be considered temporary until it is implemented. in a better way.
Comment #7
druplicate commentedYou can always roll back to the last integrated version of devel and theme developer, for the time being.
List of releases: http://drupal.org/node/3236/release
I think it's devel 6.x-1.18, not sure.
Comment #8
moshe weitzman commentedMy 02
It is awkward to have to enable/disable the module all the time.We had 2 toggles; link for module disable, and a checkbox at bottom left. I think this whole UX needs re-think and re-code. So, adding back a link may not be best approach.
Comment #9
jmcoder commentedWhat would be ideal here is to allow it to be installed, but only produce output conditionally. This could hang an ajaxy thingy onto the Devel menu block that just toggles output on & off. This should be easy enough to do. Then when you're "really done" with theming you just disable the module completely.
Comment #10
jerseycheesesubscribing
Comment #11
masondib commentedsubscribing
Comment #12
brack11 commentedsubscribing and supporting jmcoder
Comment #13
vegardjo commented+1 subscribing
Comment #14
joetsuihk commentedsub
a toggle in admin_menu? ajax enable is "good to have" i think, coz we will have to reload the page anyway.
Comment #15
tylerh111 commentedThe tricky part, as noted in the comments of devel_themer.module, is that if devel_themer is disabled, how can it inject the menu item necessary to enable itself?
I suggest creating a separate module within the devel_themer package called "devel_themer_toggler". The toggle menu item and enable/disable logic moves to devel_themer_toggler. Then the developer will typically leave the devel_themer_toggler module enabled to provide the devel_themer toggle functionality.
I have attached a devel_themer_toggler implementation I adapted from the old code in the devel module. I currently have it sitting right alongside the devel_themer.* files within the devel_themer module folder. I am offering this as an alternative to Dr00py's "quick and dirty" patch offered in comment #6 above and as a possible solution to the issue.
Comment #16
ay13 commentedvery slick tylerh111, works well for me.
Comment #17
reubenavery commentedsubcribe
Comment #18
nightowl77 commentedGuys, just a suggestion....
I don't think it is necessary to create another module on top of devel_themer just to handle the toggle switch.
Why not just create another form item in /admin/settings/devel_themer looking like this
[ ] Enable Theme developer
[ ] Display theme log <------ Currently on Theme Developer's Settings page
Then a simple if (variable_get('theme_developer_enabled', FALSE) can be added to the function devel_themer_registery_alter. If the checkbox was ticked, themer would work like normal, otherwise it will not change the registry and will not add additional divs to your output
Code: not tested - it's just a representation of the idea I have :
Please let me know if you like this idea. If there is enough interest I'll start rolling a patch.
Comment #19
dafederA strong vote for committing tylerh111's solution, at least until a more super and magical UX is concieved. A separate admin_menu item right next to "enable developer modules" would be nice also.
Comment #20
echoz commentedsubscribe
Comment #21
adulfan commentedJust installed tylerh111's solutions, was totally lost with out it. It should be part of the devel module. I was working with this toggle and work but thought it was part of the devel by default and spent 30 minutes figuring out where it is, until came about it, here. Thank you tylerh111.
Comment #22
seanhellwig commentedHey everybody, I created a simple module and bookmarklet that adds the toggle. I put it up on GitHub if anybody is interested.
http://github.com/seanhellwig/Drupal-Theme-Developer-Toggle-Module
Hope somebody finds this useful
Comment #23
KrisG commentedsubscribe
Comment #24
shopdogg commentedsubscribe
Comment #25
Andrew Schulman commentedsubscribe
Comment #26
evelien commentedsubscribe
Comment #27
ofktoubro commentedsubscribe
Comment #28
danny_joris commentedsubscribe
Comment #29
sebas5384 commentedsubscribe
Comment #30
jonathan1055 commentedThanks tylerh111 and nightowl77. The module in #15 works fine, but I also agree with #18 that it is a shame to have another separate module. The form tickbox item suggested could probably be made to work (although I've not verified the actual method used in devel_themer_theme_registry_alter) but it would require several clicks (admin -> settings -> devel themer, tick the box, save config, return to the page you wanted to check theming on). The beauty of the menu item is that if you have the devel block displayed then it is always only one click away and does not alter the page being viewed.
If there was a way to combine the ease of use of tylerh111 code into the existing devel_themer module, ie not disable the module but use the idea suggested by nightowl77 then that would be a good solution all round.
Jonathan
Comment #31
Adam Dyga commentedModule provided in #15 works fine and I don't think there is anything wrong with this approach. Actually devel_themer may be always shipped with the devel_themer_toggler sub-module, it does its job.
Comment #32
denes.szabo commentedI think there are another points of view: I am working on a big site. Not as big, but quite big. If you disable a module Drupal will rebuild the menu_router table.
On my devel computer it last 5 minutes! (Core2, 4G ram)
I just want make a theme for this site's subdomain. I need a really quick solution: enable/disable the devel_themer module themer part only, not the whole module.
So I am against the other toggler (sub) module. I think nightowl77 (#18) solution is the right way: quick toggle (in the admin module, for example), then, when I finished the theme part I disable the whole devel_themer.
Comment #33
denes.szabo commentedI have just made a patch.
The menu item devel_themer/enabled and devel_themer/disabled seems to work. But it does not disable the devel_themer module now.
Please, test it! It based on nightowl77 (#18) work and idea.
Comment #34
jonathan1055 commentedFollowing on from my comments in #30 I was about to start coding a hybrid version myself. Looks like you beat me to it. I'll gives yours a test right now.
Jonathan
Comment #35
jonathan1055 commentedThanks for making the patch. I've tested it, and it goes quite a way to getting what we want. NightOwl77's idea does work well and it will certainly allow the toggle feature to be controlled entirely within the devel_themer module, and without the actual module being completely enabled/disabled.
However there were a few things missing. The main problem was that you attempted to complete the idea started in the original which had two menu links with paths devel_themer/enable and devel_themer/disable. However this means that there is no menu link, only paths, so you had to type these urls manually. The ideal way to toggle the themer is to insert a link into the Devel menu just as we had when it was all one module (and like TylerH111 did).
I have taken your code, and used the menu manipulation of TylerH111, so we now have the best of both ideas. I have changed Devel_themer_toggle() so that it does not now have a parameter, because it should be a toggle - the action to take is determined by the current setting. Also drupal_rebuild_theme_registry() needs to be called when enabling the themer (at least, it is required to be called for the first time after installing)
I have also added a few standard function header boxes and included a few more comments. I'd like to know what you think, also TylerH111 and NightOwl77 - thank you for your code and ideas. I hope you agree with what we are now aiming for.
Jonathan
Comment #36
denes.szabo commentedIt seems good, I will try it tomorrow. Thank you for your fixes and efforts. I think your lates patch does exactly what I need.
Comment #37
jonathan1055 commentedMight be obvious, but just a reminder for anyone testing the patch in #35 - if you installed the devel_themer_toggle module from the zip file in #15 then you should disable that module, clear the cache and rebuild menus.
Comment #38
denes.szabo commentedI have an issue for your patch: even disable the themer I got a few span id="thmr-..."
So I think not enough to disable the theme registry alter to insert devel_themer module theme functions.
And rebuild the theme registry is expensive (slow on a big site). I think we should do:
1; devel_themer module enable. It rebuilds the theme registry once. But does nothing with the output.
2; themer enable: through the theme layer alters the page output.
3; devel_themer disable: cleans up the theme registry and the tmp files, variables.
I tried to write this, but it seems devel_themer_catch_function() should returns back a theme output without themer spans. A simply return if themer disabled not enough :)
Comment #39
denes.szabo commentedI seems at last I succesfully managed it. I attached a full patch against the dev.
Please test it!
Comment #40
jonathan1055 commentedYes you are right, there were thmr spans even after toggling off. I'd not spotted that, because the actual theme info pop-ups were working
correctly and disappearing after toggling off. This would have been fixed if we called drupal_rebuild_theme_registry() after both toggling on
or off, but you say that it is expensive on a site with many themes/modules, and I'm not in a position to disagree with you.
So, yes your new patch looks good to me, I've tested it and works fine. The changes you made are:
1. Call
drupal_rebuild_theme_registry()in newly added hook_install()2. Call
drupal_rebuild_theme_registry()in hook_uninstall3. Remove
drupal_rebuild_theme_registry()from devel_themer_toggle()4. Remove
if (!devel_themer_enabled()) returnfrom top of devel_themer_theme_registry_alter()5. Add check on
devel_themer_enabled()into condition inside devel_themer_catch_function()I've learnt more now about how devel_themer intercepts theme calls. I think it would be good for someone else in the long thread of subscribers to test this before we mark it 'reviewed and tested'.
Jonathan
[edited for typos and formatting]
Comment #41
jonathan1055 commentedOh, I forgot to say that patches should be made from within that modules directory, not the next one up. I had to edit the patch and remove the /devel_themer from each of the +++ and --- lines to bring it in line with Drupal standards.
Comment #42
denes.szabo commentedThank you for your review. But I do not want to take all credit for this patch - we worked on this together, not just me.
Patch: I made it in the modules dir not in the devel_themer. Because of it patches more files not just one. I do not know it is right or not, but I followed this instructions written there http://drupal.org/patch/create, the section titled: "Switches for the diff command".
Comment #43
jonathan1055 commentedThe instructions are slightly contradictory. In the paragraph you mention, I think it is more referring to comparing the directories for your info, although it does have > filename.patch at the end. But this is different from the paragraph earlier in the page named Check your directory which says
I think this is the more usually accepted way to make a patch. You have the original and the new file in the same directory. If you have changed more that one file, then patch each one and concatenate the output, for example this is how I made my patch:
The two >> on the second command cause the output to be appended to the same file. There are lots of ways to make patches, and yours was not wrong, it just caused me to have to edit the file before applying.
Hope that helps.
Jonathan
Comment #44
topdawg commentedsubscribe
Comment #45
Eldon.T commentedDenes.Szabo your patch "devel_themer.753938_1.patch" seem to work fine here too.
i patched it on my linux with "patch -p1 < patchfile", within the /devel_themer directory to avoid any mismatch and it hasn't reported any problems or errors.
thx for your work.
Comment #46
JeremyFrench commentedPatch commited here, thanks. I made one small change which was the default for devel_themer_enabled to be set to true, otherwise if people are not using the devel block theme developer disappears with no way to enable. Otherwise it is a great patch.
Comment #47
echoz commentedForgive me if reopening is inappropriate, and correct me if I'm missing something.
I believe this is not a fix for this issue, because this "toggle" (committed in #46) keeps theme developer checked on the modules page when it is "disabled" via the toggle link This results in an error from (I'm assuming) filefield, from an edit page with a filefield field, saying "Files may not be uploaded while the Theme Developer tool is enabled".
So after this update, I need to disable the module manually anyway. The submodule I was previously using, "devel_themer_toggler" from #15, actually toggled theme developer's checkbox off, and did not cause this conflict.
Comment #48
JeremyFrench commentedHi. Thanks for your feedback.
My feeling is that the patch as is solves the issue of theme developer markup breaking layout.
The issue with file uploads seems to be a specific issue where another module is disabling functionality based on theme developer being enabled.
This is either a separate bug in this module or in filefield.
Looking forward there may be user specific permissions for this module so a blanket enabled and disable will not do.
Comment #49
JeremyFrench commentedI have created #969684: Incompatibilty with filefield to look at why this is in filefield.
Comment #51
jonathan1055 commentedChanging the title to reflect the issue, and for better results when searching.
Apologies to everyone who has subscribed to this thread, and who will get informed of this trivial change :-)
Jonathan
Comment #52
voipfc commentedIs this working with later releases of devel if it is committed into the devel module itself?
I can't see any sign of it after I upgraded? 6.x-1.26, 2011-Jul-22
Comment #53
voipfc commentedI think it failed to work because jquery was not installed. Consider it fixed.