I get a lot of :

Notice: Undefined property: stdClass::$microdata in microdata_field_attach_view_alter() (line 286 of /var/www/vhosts/XXX/httpdocs/sites/all/modules/microdata/microdata.module).
Notice: Undefined property: stdClass::$microdata in microdata_field_attach_view_alter() (line 350 of /var/www/vhosts/XXX/httpdocs/sites/all/modules/microdata/microdata.module).
Notice: Undefined property: stdClass::$microdata in microdata_field_attach_view_alter() (line 286 of /var/www/vhosts/XXX/httpdocs/sites/all/modules/microdata/microdata.module).
Notice: Undefined property: stdClass::$microdata in microdata_field_attach_view_alter() (line 350 of /var/www/vhosts/XXX/httpdocs/sites/all/modules/microdata/microdata.module).
Notice: Undefined property: stdClass::$microdata in microdata_field_attach_view_alter() (line 286 of /var/www/vhosts/XXX/httpdocs/sites/all/modules/microdata/microdata.module).
Notice: Undefined property: stdClass::$microdata in microdata_field_attach_view_alter() (line 350 of /var/www/vhosts/XXX/httpdocs/sites/all/modules/microdata/microdata.module).

What is still wrong?

Comments

Anonymous’s picture

Please try downloading the dev version, clear your cache, and then report back here on whether you get the same errors.

jami3z’s picture

I have the same issue but is it possible to get a patch for beta as I would rather try and stay away from using a dev version on my production site? cheers

ticaasd’s picture

i had the same issue on commerce kickstarter and while searching for a fix i found this post so ill post my solution
i know probabil its not the way to do it but it fixes the error and i dont think i effects anything :

on my website i was getting it when i was adding the item to basket, and i think that line items dosen't have any microdata, but the modules trys to get them, so i simple modifie it to skip it if theres no micro data found just bui changeing this:

around line 278 in microdata.module you will find a if that skipes the adding of microdata

function microdata_field_attach_view_alter(&$output, $context) {
foreach (element_children($output) as $field_name) {
$element = &$output[$field_name];
// Ensure this is actually a field.
if (!field_info_field($field_name)) {
continue;
}

to this:

function microdata_field_attach_view_alter(&$output, $context) {
foreach (element_children($output) as $field_name) {
$element = &$output[$field_name];
// Ensure this is actually a field.
if (!field_info_field($field_name)||empty($subject_entity->microdata[$field_name])) {
continue;
}

if anyone can point a better solution, thanks in advance!

Anonymous’s picture

Can someone please confirm whether this is still an issue when they are using dev? I believe that this is a duplicate of an issue that was already fixed in dev.

daemonchrist’s picture

I had a very similar issue after updating to the latest dev version. I fixed it by disabling and re-enabling the microdata module. Not sure why that worked, but it did...

daemonchrist’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev
Issue summary: View changes
Status: Active » Fixed

Fixed in latest dev

Status: Fixed » Closed (fixed)

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