Hello,

i installed the jquery mobile theme. It is very nice, but i have the following error:
warning: Invalid argument supplied for foreach() in /drupal/sites/all/themes/mobile_jquery/includes/mobile_jquery.theme.inc on line 79.
warning: Invalid argument supplied for foreach() in /drupal/sites/all/themes/mobile_jquery/includes/mobile_jquery.theme.inc on line 91.

This error appears, when i see a node with comments. For every comment the two erros appears. So if i have 3 comment i have 6 errors.

Any idea?

Thanks

strauch

Comments

jeffschuler’s picture

Hmm.

I think this may be related to core issue #411164: comment links clobber their own data.

It looks like this theme is duplicating most of core's theme_preprocess_comment(). Since the core theme_preprocess_comment() has already turned $variables['links'] into a string by theme()ing it, when we send it to our implementation of theme_links() and it fails in foreach, (though it gets through count().)

I'm not running a D6 version of this theme yet, so I can't test.

Try commenting-out line 129 of mobile_jquery.comments.inc -- by changing:
$variables['links'] = isset($variables['links']) ? theme('links', $variables['links']) : '';
to
// $variables['links'] = isset($variables['links']) ? theme('links', $variables['links']) : '';

...and see if that fixes this issue?

strauch’s picture

yes this works, thank you very much.

Best Regards

strauch