When i check the Themer info box, i can't select any thing on the page to get information about template and theme function...

Comments

dave reid’s picture

Project: Devel » Theme developer
Component: devel_themer » Code

Moving to the theme developer module.

effulgentsia’s picture

Title: Themer info doesn't work » Drupal 7 version of theme developer does not work

Since this issue was here first, making this the primary issue to direct duplicates to. Yes, the D7 version of this module does not work yet.

Volvo’s picture

It still doesnt work. Are there any updates on this issue?
It seems that I have the same problem. I don't get any red squares for each table/div either. And the 'Click on any element to see information about the Drupal theme function or template that created it.' box stays emtpy. Anyone have a solution on what todo/check/solve?
Cheers :)

brian.travis’s picture

The problem is on line 191 of devel_themer.js.

var vars = Drupal.settings[id];

There is no [id] key in Drupal.settings.

das-peter’s picture

Patch for file_scan_directory - it uses preg regexp syntax now: http://drupal.org/node/224333#preg_match

JeremyFrench’s picture

Applying that patch didn't work for me.

das-peter’s picture

Hi JeremyFrench,

try this one. Looks like the other was messed up by cleaned white-spaces :|

JeremyFrench’s picture

Still dosn't seem to do the trick, but looking at the page source I don't seem to get any of the themer markup so it could be something else is wrong. Could be theme related.

das-peter’s picture

The patch fixes just an issue with the function file_scan_directory - there are several issues left e.g. the js thing Brian mentioned in #4.
I didn't manage to drill down and fix other stuff yet.

*Edit*: Highlight the fact that this patch only fixes a minor issue while all the other stuff stay's broken...

JeremyFrench’s picture

OK, I'll keep watching and test. Don't think I will have time to look into fixing for at least a couple of weeks.

Ryan Palmer’s picture

Patch #7 worked for me. I think it's a bit dated, but easy to apply manually anyway. Thanks!

Ryan Palmer’s picture

Clarification: the reason why I say it was dated was because the existing line in devel_themer.module was different in my copy, but it was the Drupal 6 version.

Anonymous’s picture

Has anyone been able to use this with Drupal 7 ?
Theme developer is so important for themers !
Patch #7 does not solve the issue of the theme developer not working.

mermentau’s picture

Been following this since June 2010 hoping it would get fixed. It works so good in Drupal 6. Patch didn't work for me either.

JeremyFrench’s picture

StatusFileSize
new14.19 KB

I have hacked together a slightly less broken version of D7 theme_developer.

I tried to remove the copy of theme which the previous version had, but I am now not sure if that was such a good idea. It works in a very limited sense. It will show you the theme suggestions (in raw format), and show variables and parents.

There is much still to be done on this, when I get a chance I will do some more and put on github for collaboration.

Anonymous’s picture

cyprien2’s picture

Great work !
I try to understand how it works...

JeremyFrench’s picture

I have now improved (a little) and put on github.

http://github.com/jeremyfrench/devel_themer

Currently it gives the raw theme suggestions and the variables. This needs to be tidied up a lot. My goal is to emulate the methods that try to find the templates/functions rather than copy theme as the D6 version did. I am still not sure if this is possible or even a good idea.

JeremyFrench’s picture

To anyone following, the github version has had an update, it now uses the intercept function the same as the D6 version did.

It works for theme functions and templates which respect the attributes_array convention. It won't display info for items which don't put the attributes in.

If people could test and put bugs on github that would be appreciated. Once it is in better shape I will post a patch back here.

mermentau’s picture

Jeremy, This is a giant step improvement. My first ever clone from github and it worked good.

webchick’s picture

Priority: Normal » Critical
Status: Active » Needs review
StatusFileSize
new31.1 KB

A completely not working module is a critical bug.

Jeremy's version is certainly further along. Here's a patch of his work as it stands currently. Please do not give me credit on commit.

Jeremy, what about rather than maintaining a fork of this module off on GitHub where only someone who's stumbled across this issue will find it, you ask effulgentsia for co-maintainer rights so we can fix the module properly here on Drupal.org?

JeremyFrench’s picture

Happy to be Co maintainer. Will email effulgentsia, and moshe to see if I can be co maintainer.

effulgentsia’s picture

+1 from me about Jeremy co-maintaining. Apologies to everyone that I've been such a bad maintainer of this module. I took it on before getting deep into D7 core work with high hopes for being able to do a good job with it, but I haven't had the time, so am happy that Jeremy is offering to co-maintain. I'm interested in Moshe's thoughts and community thoughts before making it official.

mermentau’s picture

After updating to Drupal7-beta2 the update mentioned here in post #19 seems to conflict with "Manage Display" in Administration>Structure>Content types>Article. When I try to edit the style on an image field I get:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /system/ajax

This is just a snip of the error message that fills an entire page size window.

To make sure I disabled the "Theme Developer" and the problem went away.

moshe weitzman’s picture

Hurray to JeremyFrench for volunteering. I just gave him commit access and issue queue maintainer role. Thanks for loving this module.

JeremyFrench’s picture

Thanks moshe & effulgentsia, I hope I can continue the good work.

@bumpaw I have tried to recreate the error with beta2 and have had no luck, with theme developer on the widget settings form seems to work fine, both in standard admin and the overlay. Could you post the full dump it may give me an idea how to reproduce.

JeremyFrench’s picture

I have worked on this a little today, I should post a better patch here by the end of the week. I am just cleaning the code so it complys with coding standards before I do so.

mermentau’s picture

StatusFileSize
new9.77 KB

I'm only seeing the problem in admin. I use the Seven admin theme and Theme Developer is not working for that theme. If I change admin theme to Barik it works, but then a couple of times I clicked a main admin link at the top like "Structure" and got the error pop. The behaviors are sadly inconsistent and it seems like the javascript in theme developer is conflicting with the javascript in admin.

FR6’s picture

Thank you Jeremy, your patch (#21) as work for me.

JeremyFrench’s picture

StatusFileSize
new39.48 KB

Here is updated patch. Fixes some bugs and stops coder complaining. I'll commit if I can get someone to check it over. Then bugs can be tracked as seperate issues.

@bumpaw dosn't fix your issue I'm afraid, I think I know what causes it and will have a look soon.

JeremyFrench’s picture

Status: Needs review » Fixed

Fix commited.

If there are issues with theme developer being completly non functional on D7 plese re open. Other issues please open as seperate tickets.

@bunmpaw your issue is open as #959990: Confilct with content "manage display" page. .

indigoblue’s picture

I've just tried to use the latest release of Theme Developer ( 2010-Nov-03 ) against D7 Beta 3 and as far as I can see it is still non functional. Checking Themer Info allows different areas to be selected ( red outlines ) but no theming information is displayed at all. I think it is still broken but as I am not familiar with this module and may be missing something obvious. I'll leave it to you to change the status if necessary.

Expected Behaviour:
1) Install & Enable Theme Developer
2) Check Themer Info box
3) Select area marked by red outline
4) Theme Information Displayed

Actual Behaviour
Steps 1- 3 as expected
4) No Theme Information displayed

What I have:
Windows 7
D7 Beta3

mermentau’s picture

Status: Fixed » Needs work

I experience the same behavior as reported by indigoblue and have the same core and module versions. I have xp instead of Windows 7 but that shouldn't matter.

JeremyFrench’s picture

Assigned: Unassigned » JeremyFrench

Thanks for the update. I hadn't had a chance to test against beta three yet. I'll investigate and post a follow up later today. Have a hunch it is something to do with to do with the new jquery.

JeremyFrench’s picture

Confirmation of Beta 3 causes the issue and error is in jquery.

JeremyFrench’s picture

Status: Needs work » Fixed

It is caused by this bug in jQuery. I have created #972050: jQuery 1.4.4 breaks theme developer and a patch should be forthcoming.

edit to link to correct bug.

Status: Fixed » Closed (fixed)

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