Notice: Undefined property: FieldCollectionItemEntity::$microdata in microdata_preprocess_field() (line 384 of .../modules/contrib/microdata/microdata.module).
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in microdata_preprocess_field() (line 423 of .../modules/contrib/microdata/microdata.module).

I think this happens when you have entities that were saved before the microdata module was installed. I've worked around the error reports by initialising these arrays at the start of the function, but I'm not sure if that's the "correct" solution.

Comments

ianthomas_uk’s picture

Status: Active » Needs review
StatusFileSize
new910 bytes

Here's my patch that suppress the error messages.

Anonymous’s picture

Have you tried clearing your cache?

ianthomas_uk’s picture

Thanks for the quick response.

I've had microdata installed for a while, but I just tried clearing the cache anyway and it didn't make any difference.

I'm also getting

Notice: Undefined index: type in microdata_get_value_type() (line 734 of .../modules/contrib/microdata/microdata.module).

which may well be related

Anonymous’s picture

I just noticed the "I've had microdata installed for a while" part. I just want to check, have you tested this against the latest dev?

ianthomas_uk’s picture

I'm running 7.x-1.0-beta1. I've not tested it against dev yet but I did look at the relevant code and didn't see anything to suggest it would be any different. I can do some more in depth testing once I've got the site I'm working on released in a week or so.

Anonymous’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta1

I'm going to switch the Version to reflect that information.