An RDF export included a skos:broader property for a term in a completely different vocabulary.
<skos:Concept rdf:about="http://example.com/area/west-coast">
<rdfs:label>West Coast</rdfs:label>
<skos:prefLabel>West Coast</skos:prefLabel>
<skos:member rdf:resource="http://example.com/taxonomy/vocabulary/4" rdf:value="Area"/>
<skos:broader rdf:resource="http://example.com/abc/ste" rdf:value="Steel"/>
</skos:Concept>
Making the change in the attached patch resolved the issue. Not sure that this is correct though. Is the old code intended to merge new parent terms with any existing ones?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | taxonomy_xml_remove_bad_parent_1835120-2.patch | 806 bytes | jonathan_hunt |
| taxonomy_xml_remove_bad_parent.patch | 684 bytes | jonathan_hunt |
Comments
Comment #1
jonathan_hunt commentedOk, the above was a misdiagnosis. Turns out taxonomy_xml_rdf_add_terms() is invoking hook_taxonomy_term_load() with a "flat" array of terms but the array needs to be keyed by tid (see http://api.drupal.org/api/drupal/modules%21taxonomy%21taxonomy.api.php/f... ). This causes terms from outside the vocab to be referenced.
Attached patch resolves it for me.
Comment #2
jonathan_hunt commentedComment #3
dman commentedHuh, you are right. It loads a list built from array_keys, not from the object data.
I wonder why that issue didn't bite a LOT harder a lot earlier...
Comment #4
dman commentedThat is a hook definition you linked to in the docs. Maybe the function there should have been http://api.drupal.org/api/drupal/modules%21taxonomy%21taxonomy.module/fu...
... why am I even using module_invoke_all there? hm