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
Comment #1
Anonymous (not verified) commentedPlease try downloading the dev version, clear your cache, and then report back here on whether you get the same errors.
Comment #2
jami3z commentedI 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
Comment #3
ticaasd commentedi 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!
Comment #4
Anonymous (not verified) commentedCan 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.
Comment #5
daemonchrist commentedI 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...
Comment #6
daemonchrist commentedFixed in latest dev