Update according to hook_theme api changes
sanduhrs - October 27, 2009 - 12:03
| Project: | Coder |
| Version: | 7.x-1.x-dev |
| Component: | Review/Rules |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
Code review doesn't display results table because of api changes in hook_theme, see #600974: theme() fails for theme functions taking one argument in renderable arrays
Thos are the messages i got:
* Notice: Undefined index: render element in theme() (line 803 of /home/sauditor/workspace/nowblogging/includes/theme.inc).
* Notice: Undefined index: form in theme_coder_review_table_cols() (line 534 of /home/sauditor/workspace/coder/coder_review/coder_review.module).
* Warning: Invalid argument supplied for foreach() in theme_coder_review_table_cols() (line 537 of /home/sauditor/workspace/coder/coder_review/coder_review.module).
* Warning: Invalid argument supplied for foreach() in theme_coder_review_table_cols() (line 546 of /home/sauditor/workspace/coder/coder_review/coder_review.module).
* Notice: Undefined index: render element in theme() (line 803 of /home/sauditor/workspace/nowblogging/includes/theme.inc).
* Notice: Undefined index: form in theme_coder_review_table_cols() (line 534 of /home/sauditor/workspace/coder/coder_review/coder_review.module).
* Warning: Invalid argument supplied for foreach() in theme_coder_review_table_cols() (line 537 of /home/sauditor/workspace/coder/coder_review/coder_review.module).
* Warning: Invalid argument supplied for foreach() in theme_coder_review_table_cols() (line 546 of /home/sauditor/workspace/coder/coder_review/coder_review.module).
* Notice: Undefined index: render element in theme() (line 803 of /home/sauditor/workspace/nowblogging/includes/theme.inc).
* Notice: Undefined index: name in theme_coder_review() (line 1950 of /home/sauditor/workspace/coder/coder_review/coder_review.module).
* Notice: Undefined index: filename in theme_coder_review() (line 1951 of /home/sauditor/workspace/coder/coder_review/coder_review.module).
* Notice: Undefined index: results in theme_coder_review() (line 1952 of /home/sauditor/workspace/coder/coder_review/coder_review.module).
* Notice: Undefined index: render element in theme() (line 803 of /home/sauditor/workspace/nowblogging/includes/theme.inc).
* Notice: Undefined index: name in theme_coder_review() (line 1950 of /home/sauditor/workspace/coder/coder_review/coder_review.module).
* Notice: Undefined index: filename in theme_coder_review() (line 1951 of /home/sauditor/workspace/coder/coder_review/coder_review.module).
* Notice: Undefined index: results in theme_coder_review() (line 1952 of /home/sauditor/workspace/coder/coder_review/coder_review.module).
* Notice: Undefined index: render element in theme() (line 803 of /home/sauditor/workspace/nowblogging/includes/theme.inc).
* Notice: Undefined index: name in theme_coder_review() (line 1950 of /home/sauditor/workspace/coder/coder_review/coder_review.module).
* Notice: Undefined index: filename in theme_coder_review() (line 1951 of /home/sauditor/workspace/coder/coder_review/coder_review.module).
* Notice: Undefined index: results in theme_coder_review() (line 1952 of /home/sauditor/workspace/coder/coder_review/coder_review.module).Attached is a patch that fixes the issue.
| Attachment | Size |
|---|---|
| coder-review-hook_theme-01.patch | 1.51 KB |

#1
The Select specific modules and Select specific themes fieldsets aren't populated aswell.
#2
This patch works for me at first blush - remember to clear your caches.
#3
I also tested and no errors in theme.
#4
Actually, it fixes the errors from theme, but make form hidden for render function. This is an updated patch.
#5
patch seems to work for me
#6
Works for me to.
#7
perhaps coder_upgrade should be included in this patch, it is not updated, and shows some warnings.
#8
I think these coder_upgrade warnings will only show up if you have no modules enabled which implement hook_upgrades(). $upgrades_sort just needs to be initialized to an empty array(). Tacked this onto the end of the patch.
#9
Regarding #8 and #9, Coder upgrade has been fixed. The warnings related to the reversal of the registry changes which again requires manual inclusion of code files.