I am receiving an error code when clicking on the galleries tab stating: Fatal error: Cannot use object of type stdClass as array in /home/franco41/public_html/sites/all/themes/house_2_d7/drupal7_theme_methods.php on line 230
Code for theme is from line 228:
foreach (array_keys($content) as $name) {
$$name = & $content[$name];
$field_type = isset($content[$name]['#field_type']) ? $content[$name]['#field_type'] : NULL;
if ($field_type == null || $field_type != "taxonomy_term_reference") continue;
$result = $content[$name];
}
Check it on www.wildthang.co.za it is only on the landing page. Gallery works fine
Comment | File | Size | Author |
---|---|---|---|
#4 | drupal7_theme_methods.txt | 9.3 KB | Nnilsson |
Comments
Comment #1
Nnilsson CreditAttribution: Nnilsson commentedComment #2
Moloc CreditAttribution: Moloc commentedI'm not sure, how we can help. Maybe you need to update your theme function?
I was not able to find this theme on drupal.org
In which function is this code?
Comment #3
Moloc CreditAttribution: Moloc commentedWere you able to fix the problem?
I cannot see it any more on your website.
See also #2.
Comment #4
Nnilsson CreditAttribution: Nnilsson commentedError is on the theme side, works fine with Bartik. Theme is available from freethemes4you. It must be from the method that the theme interacts with the gallery for d7
Comment #5
freethemes4you CreditAttribution: freethemes4you commentedThe bug has been fixed. Please provide the feedback - was the issue has been resolved?
Thanks,
Jacob.
Comment #6
freethemes4you CreditAttribution: freethemes4you commentedMoloc
It actually was a problem in the theme function of the theme. Actually it existed in all our Drupal 7 compatible themes, but thanks to the issue we've discovered and fixed it cross the board.
For the folks who already using the theme:
You can
a) download it again from http://freethemes4you.com (use your theme keywords in the site search)
OR
b) modify it as follows:
File: drupal7_theme_methods.php
Line: 230
$field_type = isset($content[$name]['#field_type']) ? $content[$name]['#field_type'] : NULL;
to
$field_type = (is_array($content[$name]) && isset($content[$name]['#field_type'])) ? $content[$name]['#field_type'] : NULL;
Many thanks to you, Armin Schuchter who proposed the fix and Nnilsson for the bug discovery!
Jacob.
Comment #7
Nnilsson CreditAttribution: Nnilsson commentedRnadom luck of the draw that I got the error :) Thanks for the support, seems fine.
Comment #8
Moloc CreditAttribution: Moloc commentedfixed by the theme author.
Thank you Jacob.