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

CommentFileSizeAuthor
#4 drupal7_theme_methods.txt9.3 KBNnilsson
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Nnilsson’s picture

Assigned: Nnilsson » Unassigned
Moloc’s picture

I'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?

Moloc’s picture

Status: Active » Postponed (maintainer needs more info)

Were you able to fix the problem?
I cannot see it any more on your website.
See also #2.

Nnilsson’s picture

FileSize
9.3 KB

Error 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

freethemes4you’s picture

The bug has been fixed. Please provide the feedback - was the issue has been resolved?

Thanks,
Jacob.

freethemes4you’s picture

Moloc

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.

Nnilsson’s picture

Rnadom luck of the draw that I got the error :) Thanks for the support, seems fine.

Moloc’s picture

Title: Fatal Error report » Fatal Error report - issues with freethemes4you
Status: Postponed (maintainer needs more info) » Fixed

fixed by the theme author.

Thank you Jacob.

Status: Fixed » Closed (fixed)

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