Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I tried to update the module to it's last version, but the database update does not work. I get the following message:
The following updates returned messages
office_hours module
Update #7100
Failed: EntityMalformedException: Missing bundle property on entity of type taxonomy_term. in entity_extract_ids() (line 7671 of /var/customers/webs/pheonton/sightsrank/includes/common.inc).
Comment | File | Size | Author |
---|---|---|---|
#5 | office_hours_2005614_update_taxonomy_terms.patch | 1.23 KB | johnv |
Comments
Comment #1
johnvThis is not necessarily an error of office_hours, see #2004698: error when updating from 7.x-1.1 to 7.x-1.2.
Comment #2
giorgio79 CreditAttribution: giorgio79 commentedI cannot upgrade as well, although, my error looks different. Probably, I have too many nodes with office hours, and the update is not using batch api. Solved it by reinstalling the module as only one node had values.
Comment #3
johnvThe hook_update is restartable.
I made a small change , so that empty fields are not updated. It should mean a performance improvement on installations like giorgio's (lots of nodes, few office_hours-content).
Comment #4
jackfoust CreditAttribution: jackfoust commentedI'm having the same issue as the original poster. I applied the patch from commit a3ed801 with no luck.
I can tell you that my problem occurs on field_attach_load();
The following parameters are being passed.
field_attach_load('taxonomy_term',$full_entities,FIELD_LOAD_CURRENT,array('field_id' => '17'));
$full_entities print_r() = Array ( [1] => stdClass Object ( [tid] => 1 ) )
field_id 17 is office_hours field attached to my taxonomy_term of 'locations'
Comment #5
johnvThis happens when the field is attached to taxonomy_terms and -in general- any entity type whose 'bundle' value is not stored in a '$entity->bundle' variable, but in another field, like '$term->vocabulary_machine_name'.
Attached patch is committed here.
The error is corrected in current -dev version or version 7.x-1.3 (when available).
Comment #6
jackfoust CreditAttribution: jackfoust commented7.x.1.3 resolved my issue. Thanks John!