I was unable to access a number of nodes in my site with a "The website encountered an unexpected error".

This showed up:

Notice: Trying to get property of non-object in ds_field_formatter_view() (line 1238 of /srv/www/site/public_html/sites/all/modules/ds/ds.module).
EntityMalformedException: Missing bundle property on entity of type taxonomy_term. in entity_extract_ids() (line 7633 of /srv/www/site/public_html/includes/common.inc)

As far as I was able to track it this seemed to happen only when I specifically enable the option Format = "Separated" for a "Term Reference" field type with a "taxonomy autotag field" widget associated (the other Format options work fine!),

Contrary to other similar items which work correctly the troublesome one has the single specificity of being associated with OpenCalais.

Comments

Status:Active» Postponed (maintainer needs more info)

I could install opencalais to test, briefly just looked at the code and it seems there is some sort of setting for tagging or so, that's enabled I guess ?

It is presently enabled but only in the manual mode (you see a button you can click to get suggestions for taxonomy terms related to the body content).
Nevertheless in the past I used it in "automatic mode" to bulk update/add suggested terms to all nodes. This might have been dealt with improperly by opencalais, which I fear is a somewhat buggy module.
In fact if I change the format to say "Links", open a problematic node and save it again and return after to the "Separated" format the issue disappears for that node. So it seems to have something to do with the way taxonomy terms were first saved.
In the end this is more likely an opencalais issue in the first place. But that is just me guessing.

@hvalentim

I was getting these errors when trying to run cron to rebuild the search index on my site.

EntityMalformedException: Missing bundle property on entity of type taxonomy_term. in entity_extract_ids() (line 7633 of /xxx/xxx/xxx.com/includes/common.inc).

Notice: Trying to get property of non-object in ds_field_formatter_view() (line 1238 of /xxx/xxx/xxx.com/sites/all/modules/ds/ds.module).

Cron was working. But the indexing of the site was not working due to the errors.
I came across this thread.

I went into my one content type where I had the display of taxonomy terms set to "Separated".
I changed this to "Links".
I cleared the cache and ran cron.
Error messages are gone and the indexing of the site was completed.

I did some further testing.
After getting the search fully indexed again.
I went back into my content type and set the display of taxonomy terms back to "Separated".
I ran cron another couple of times and sure enough it ran properly doing the indexing.

I think this speaks to your point: "So it seems to have something to do with the way taxonomy terms were first saved.?"
I imported a lot of d6 content into the site using the Feeds module. So maybe it saved the terms in not such a good way.

Anyway, I am glad I came across this info.
Thanks

In mi case was that I was changing the view mode on the fly from "full" to "frontpage" (custom). The fields that are loaded are those from the full view mode and if some of them are not in both I get this error.

Well, as far as Code goes, I'm not sure what would fix the issue, but I was getting the same issues as Dougzilla when I was trying to get some pages to view properly and they weren't working. I did the same thing - found the content type with the taxonomy terms (In my case called Catalog) and changed that from "Separated" to "Links". Everything functioned as normal again. Bandaid for a Bullethole I'm sure, but it's a small workaround.

I get this error when i run cron:

Notice: Trying to get property of non-object in ds_field_formatter_view() (line 1274 of ../sites/all/modules/ds/ds.module).

Since then my cron is not indexing search anymore.

Does anyone know how to solve this?

Much, much appreciated !

For me cron only started working again after i deinstalled Display Suite. I used panels instead. The moment i install DS again i cannot finish cron.

I used DS to control my search page before.

Has anyone been able to solve it?

I have the same error

Notice: Trying to get property of non-object in ds_field_formatter_view() (line 1274 of ../sites/all/modules/ds/ds.module).

Status:Postponed (maintainer needs more info)» Closed (works as designed)

To overcome this problem, configure the 'search index' view mode as well. Because if it isn't, it will fallback to default. However, it doesn't really matter /how/ something is rendered as the search index only will take out actual texts.

Experiencing the same issue.

Have a custom entity type with a taxonomy field (checkboxes). Rendering one of these entities (with no values selected for the field) via a Display Suite view mode, which is configured to display this field. Notice only shows for the field when no values are present.

Turns out my issue was not caused by Display Suite itself. An 'empty' value was being assigned to the entity field, so Display Suite (correctly) tried to render the data, but error'ed out because there was none.

Issue summary:View changes

precision