0

I've got a problem on a Drupal 7.14 site when trying to add a new node to only one content type.

I get the following error message in the log:

EntityMalformedException: Missing bundle property on entity of type taxonomy_term. in entity_extract_ids() (line 7389 of /homepages/33/d169792374/htdocs/sites/yourfutureinautomotive.com/includes/common.inc).

I've tried the fixes outlined here as well as removing modules one by one and I'm not getting anywhere.

I've even reverted back to 7.8 to make sure I was on the same version as other people who were having the issue.

I'm open to any ideas or troubleshooting hints.

Ta

EDIT

As per @mojzis suggestion below I used the Devel dpm function. The following was output:

enter image description here

EDIT 2

vid: 14 is the problem. There is no vocab with vid of 14. Trying to hunt down a reference to it anywhere but not having much luck.

  • Are you creating the node programmatically? Could you post your code? – Chaulky Jun 12 '12 at 16:54
  • No this is all through the admin. – SpaceBeers Jun 12 '12 at 17:28
  • 1
    try adding dpm($entity) before the exception to see which one it was, and whether it has a vocabulary_machine_name set. – mojzis Jun 12 '12 at 18:30
  • @mojzis - I've tried this, it's giving me a vocab machine name of null. – SpaceBeers Jun 13 '12 at 8:21
  • it looks weird altogether :) there is no tid ? And BTW, the vid should refer to some term, not taxonomy. So, to recap the situation: you have a field which is setu[ as a term reference, right ? And what are the settings there ? Which vocab is selected ? Is there any default value set ? What value do you provide when saving ? Does this happen when you set some value or when you set no value ? – mojzis Jun 13 '12 at 9:32
2

Your issue is most likely related to the Media module, and specifically this issue: 'Missing bundle property on entity of type file error'. In your troubleshooting efforts, did you run across this info? A quick check to confirm if this is the culprit is to follow the step(s) outlined in comment #5.

0

OK I'm going to answer this with that's solved the issue for me.

I got a bit desperate and was trying to hack common.inc in the core (may god have mercy on my soul), but after checking things out using the wonderful Devel module I just added in a test taxonomy vocabulary with a VID of 14. I can now add content again which is good, but am none the wiser as to the actual cause of the problem.

Interestingly the vocab as terms added to it when I add a new content of the type that was giving me trouble but they're blank. When I get a bit more time I'll try and troubleshoot this properly but if anyone else has the same issue, this is what solved it for me.

  • so, once you have some time :) try running dpm(field_info_fields()); in devel/php . the fields that are of interest to you have ['type'] = 'taxonomy_term_reference' and you should check their ['settings']['allowed_values'][0]['vocabulary'] - that holds the machine name of the vocabulary ... how it translates to a non-existent id is really interesting :) – mojzis Jun 13 '12 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.