Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
documentation
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
30 Nov 2007 at 19:01 UTC
Updated:
21 Dec 2007 at 16:01 UTC
Jump to comment: Most recent file
For details please see the GHOP task page.
The code should be OK, except that there are two functions tagged as themeable which are actually not themeable. They are defined in a block that has a @defgroup themeable header, but their description include a note about this. Would these functions (theme_install_page() and theme_task_list()) better be moved out of this block, or will they be excluded from the documentation page automatically (they were there in Drupal 5 too)?
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | themeable-functions6.patch | 26.42 KB | Crell |
| #14 | themeable-functions5.patch | 24.6 KB | fberci |
| #12 | missing2.txt | 1.81 KB | fberci |
| #12 | themeable-functions4.patch | 24.11 KB | fberci |
| #6 | themeable-functions3.patch | 16.78 KB | fberci |
Comments
Comment #1
Crell commentedLooks like there's still Windows line endings in the patch. Those need to be removed. :-) Otherwise it applies cleanly, albeit with a few offsets.
For theme_button(), theme_submit(), and theme_image_button(), I'd suggest saying "Theme a form submit button" (etc.). Make it clear that it's a form element being themed.
You added a docblock to theme_progress_bar(), but it's missing @ingroup themeable.
I don't know if there is a formal standard for this, but I tend to put @ingroup directives above the parameter and return directives, without an extra newline.
If those functions cannot be overridden by themers, then I'd say they shouldn't be in the themeable group.
Comment #2
fberci commentedThank you for the comment, I've changed the comment for theme_button(), etc. (although I added comments only for theme_button() and theme_submit()).
Theme_progress_bar() is defined inside the
@defgroup themeableblock, so I don't think it needs the @ingroup directive.As for where to put the @ingroup directives, I didn't find any standard. I looked through the code, but it's done in several ways, I couldn't spot any standard. I've chosen one from these.
I've moved out the two functions mentioned above from
@defgroup themeabledirective.Comment #3
webchickMarking needs review again.
Comment #4
Crell commentedThere was one failure when applying the patch. Specifically in theme.inc, for theme_maintenance_page() and theme_install_page(). I believe another patch just went in that updated those, so this patch will need to be updated ("rerolled" as the locals say). Unfortunately large patches tend to do that sort of thing. :-/
Comment #5
KentBye commentedKudos for tackling such a big patch -- Drupal 6 is a bit of a moving target since it is still in active development, and as Crell mentioned, there are new patches going in all of the time. One way to quickly check the latest CVS commits for Drupal is to check out this page: http://drupal.org/project/cvs/3060
And taking a quick look at the patch, I noticed that you're patching against version number 1.397 of theme.inc, and it has changed a few times as you can see here:
http://cvs.drupal.org/viewvc.py/drupal/drupal/includes/theme.inc?view=lo...
They're up to version 1.400 now.
Anyway, like Crell said, the patch needs to be "re-rolled" using the most recent changes.
Comment #6
fberci commentedOh, it looks like the two not themeable functions in theme.inc have been removed or moved to another file. So that's not a problem any more.
Anyway I updated the package to the latest CVS version. This patch is almost identical to the first one, only a comment mentioned above was changed (adding word form). Is there a chance it could be committed sometime in the near future?
Comment #7
Crell commentedI will test this tonight if someone doesn't beat me to it. (Feel free to do so.)
Comment #8
Crell commented#6 still had Windows line feed characters. I don't know how to roll a patch in Windows that doesn't have them, unfortunately, but it's a good habit to get into to avoid them.
theme_task_list() in includes/theme.maintenance.inc is missing an @ingroup tag, and is not marked as unthemeable. I suspect it was just added when the maintenance themeability patch landed. It should either be marked @ingroup themeable or noted that it is unthemeable, as appropriate.
theme_color_scheme_form() in color.module is missing an @ingroup tag.
There are a whole bunch of theme functions in comment.module that are missing @ingroup tags.
There's more, too. :-( Try searching all files for the string "function theme_". That's probably the easiest way to find candidate themeable functions. You can do it file-at-a-time, but I'd recommend using an editor that can search all of Drupal at once. It will be a lot easier.
Comment #9
KentBye commentedOr you can grep from a terminal window. But it looks like you're on windows, and so it might be a bit different.
But if you can get a unix window, then this grep should also work:
grep "function theme_" -r * > x.txt;That'll output the results to a file named
x.txt.Comment #10
fberci commentedThank you for your feedback! I am really sorry for overlooking these functions. My editor must have skipped files without a known extension (.module).
I have already generated a new list based on the latest CVS and I will try to make a patch (with decent UNIX line endings) as soon as possible (probably tonight).
Comment #11
webchickAwesome, thanks for the follow-through, fberci. :) Keep on rockin'!
Comment #12
fberci commentedOK, this patch should be complete now. I added the
@ingrouptags to the other functions not found the other day (listed in missing2.txt). I have assumed that theme_syslog_format() in modules/syslog/syslog.module is not themeable, so I have left it out. Is this correct?Comment #13
Crell commentedThanks, fberci! Yeah, looks like it was .module files that got missed.
However, I'd say that theme_syslog_format() should still be flagged as themeable. It might be rather foolish of someone to try overriding it, but it's still possible so it should be flagged accordingly. It also needs a description in its docblock either way.
Comment #14
fberci commentedOK, added docblock and the themeable flag too.
Comment #15
Crell commentedApplies with a few offsets, no Windows line endings. (yay!)
theme_get_registry(), theme_get_settings(), theme_get_setting(), theme_render_template() in theme.inc are actually not themeable. They're part of the theme API internals. Yes, that's a very confusing name. :-( (One of the reasons for the @ingroup themeable is to differentiate which functions really are themeable.)
I've rerolled the patch to just remove those 3, so this is now RTBC. No sense holding it up for something that trivial. Thanks for keeping on it!
(Committers: Please don't credit me.)
Comment #16
Crell commentedComment #17
gábor hojtsyLooks good, thanks. Committed!
Comment #18
fberci commentedThank you!
Comment #19
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.