When I open admin/reports/prod-monitor/site/3/view/updates I see two messages:

Warning: Invalid argument supplied for foreach() in theme_prod_monitor_update_report() (line 29 of /var/www/d7_dev/extensions/modules/prod_check/prod_monitor/includes/prod_monitor.theme.inc).
Warning: Invalid argument supplied for foreach() in theme_prod_monitor_update_report() (line 35 of /var/www/d7_dev/extensions/modules/prod_check/prod_monitor/includes/prod_monitor.theme.inc).

and no other info on the page.

Comments

OnkelTem’s picture

Assigned: Unassigned » OnkelTem
OnkelTem’s picture

Status: Active » Needs review
StatusFileSize
new29.77 KB
new2.54 KB

I remind, that this bug triggers when a update information has not yet been fetched for a project viewed.

I deleted huge slice of code:

-        'data' => t(
-                    'No information is available about potential new releases for currently installed modules and themes. To check for updates, you may need to !cron or you can !check. Please note that checking for available updates can take a long time, so please be patient.',
-                    array(
-                      '!cron' => l(t('run cron'), 'admin/reports/status/run-cron', array('attributes' => array('title' => t('run cron')), 'query' => $destination)),
-                      '!check' => l(t('check manually'), 'admin/reports/prod-monitor/site/'.$id.'/update-check', array('attributes' => array('title' => t('check manually')))),
-                    )
-                  )
+        'data' => NULL,

which IMHO doesn't help a user and mostly repeat what is already in UI including link to manual update:

Drupal Monitor2.png

b-prod’s picture

Status: Needs review » Reviewed & tested by the community

Patch #2 fixes the issue.

malc0mn’s picture

Never seemed to have picked this up, doing so now...

malc0mn’s picture

Assigned: OnkelTem » malc0mn
Status: Reviewed & tested by the community » Fixed

Fixed. Did not apply the patch, but made it work like the D6 version. A simple piece of code was missing from the theme function:

--- a/prod_monitor/includes/prod_monitor.theme.inc
+++ b/prod_monitor/includes/prod_monitor.theme.inc
@@ -18,6 +18,11 @@ function theme_prod_monitor_update_report($variables) {
   $output .= ' <span class="check-manually">('. l(t('Check manually'), 'admin/reports/prod-monitor/site/'.$id.'/update-check') .')</span>';
   $output .= "</div>\n";
 
+  if (!is_array($data)) {
+    $output .= '<p>'. $data .'</p>';
+    return $output;
+  }
+
   $header = array();
   $rows = array();

Apologies for the extreme late fix!

Status: Fixed » Closed (fixed)

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