The Message module was working fine but I noticed one of the messages wasn't getting created by Rules. I suspect it's due to locale being enabled recently and creating with the UI gives this error.
For message types where I haven't created a different language, it seems to work fine.
2 errors in log:
Warning: array_flip(): Can only flip STRING and INTEGER values! in EntityAPIController->load() (line 219 of /usr/share/nginx/html/sites/all/modules/entity/includes/entity.controller.inc).
.
EntityMalformedException: Missing bundle property on entity of type message. in entity_extract_ids() (line 7930 of /usr/share/nginx/html/includes/common.inc).
The relevant lines in common.inc are:
// Explicitly fail for malformed entities missing the bundle property.
if (!isset($entity->{$info['entity keys']['bundle']}) || $entity->{$info['entity keys']['bundle']} === '') {
dpm($info);// My dpm
throw new EntityMalformedException(t('Missing bundle property on entity of type @entity_type.', array('@entity_type' => $entity_type)));
}
You can see where I added dpm(). $entity
is empty but $info
gives the below screenshot.
Any pointers for someone who just isn't used to debugging things like this? I've deleted every message in on the site with VBO but the error persists.
After two and half years of dev, this site was supposed to go into a proper beta next week in a friend's business but the entire UI relies on the Message module. :/
And here is a dpm of the ids for the flipping error.
Any help appreciated. I didn't expect it to all fall apart this weekend.
Edit: Closed as it is indeed a duplicate. I don't have the skills to deal with it so will just rewrite to use node functionality instead.
Edit 2: Calmed my head today and looked at things that weren't my own code. Turns out it was the Reply module which I use on Message. Reinstalling it gets rid of the errors. I don't know why it happened. It's been a part of Message for like a year during development.