Hi there - I'm afraid that as you suggested in #1309618: "Bulk Taxonomize Locations" doesn't work when source is Address Fields comment #10, I'm having problems with big data sets. (I've been successful with a smaller database of ~200 nodes).

I have a database which has roughly 3000 buildings and 3000 organisations, from many different countries. These have Addressfield data, but they're not all complete.

When I try and run Bulk Taxonomize, only on the building nodes, with "Also attach Location Taxonomy terms to nodes with those locations" deselected, most runs appear to finish with an error:
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?render=overlay&id=717&op=do StatusText: Service unavailable (with message) ResponseText: EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7501 of /var/www/phaidon/includes/common.inc).

When I go back to the config page there's a message:

Bulk Taxonomize completed successfully!
Processed 880 locations
Saved 671 new terms to the Location Vocabulary

But in fact there are only 111 terms in the Location Vocabulary, and many of them appear to be incorrect. (I haven't been able to check because the "Also attach Location Taxonomy terms to nodes with those locations" option slows down the process so much.)

Any suggestions please? Is there a way to limit the dataset that the bulk process tackles at once?

Comments

adam_b’s picture

Okay, after reconfiguring everything I got farther this time... but it stopped with this error message:
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?render=overlay&id=721&op=do StatusText: Service unavailable (with message) ResponseText: EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7501 of /var/www/phaidon/includes/common.inc).

So maybe it's not fundamentally an issue of the data set size. But I notice that the batch process says it's completing 0 of 1 - shouldn't it be splitting the task more than that?

adam_b’s picture

Tried it twice more, just on the buildings. On both occasions it gets to 27%, then ends with the same error message, and says that it's processed 880 locations. Until that point things appear to be going well and it's generating the taxonomy.

I wondered if:
- it was a connection glitch, but it seems too consistent for that
- it was a specific node, but there's a different one each time when sorted by most-recently-updated

Help meeeeeeee....

ETA: it fails with the same message at the same point if the "Also attach Location Taxonomy terms to nodes with those locations" option is not checked - just gets there much more quickly.

adam_b’s picture

And another update for today - I ran the organisation nodes alone and this completed successfully. So I suspect that it might be a problem with a specific building node. Any way I could narrow down the set?

goron’s picture

Hi adam_b. Thanks for all the details. I'll have some time to look at this today.

Are the buildings nodes? Or are they entities of a different type than node?

adam_b’s picture

Hi goron - yes, organisations and buildings are node types. There are a couple of other node types, but these two are the only ones with locations. Thanks.

noslokire’s picture

Same problem here. Using Addressfield as well, and trying to process over 5000 nodes of 1 content type. Saving them one-by-one works, but bulk taxonomizer throws the same message as above.

EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7539 of /var/www/html/dorksandcorks.com/includes/common.inc).

sawtell’s picture

Status: Active » Needs review
StatusFileSize
new3.65 KB

I have seen the same 'EntityMalformedException' error too.
For me it was because one of the entity id values returned from the select query didn't exist but the batch was still trying to access a non object from the node_load.

I have uploaded a patch from the 7.x-2.x branch although I don't think it fully solves the issue as each loop will still try to load the invalid entity_id.
Sorry about all the changes, my IDE removes the trailing spaces so they are in the patch too.
the main part is in location_taxonomize_af_bulk_taxonomize_op() :

  // ...
  $node = node_load($nid);
  if ($node) {
    foreach ($fields as $field) {
      // ...
    }
  }
  else {
    $i++;
    watchdog('location_taxonomize', 'Node :nid failed to load', array(':nid' => $nid), WATCHDOG_NOTICE);
  }
  if ($i > $limit) break;
  // ...
adam_b’s picture

Version: 7.x-2.3 » 7.x-2.4

Problem still exists in 7.x-2.4; same patch applies.

khalor’s picture

Status: Needs review » Needs work

Patch applies, and at least lets us track down what entry is causing the issue, but as ls206 stated Location Taxonomize just keeps looping round endlessly on the bad enitity_id.