filbertkm / WikibaseImport

Import entities from another Wikibase instance (e.g. Wikidata)
GNU General Public License v2.0
28 stars 18 forks source link

Entity that has the same label as existing entity will not be imported #36

Closed D063520 closed 5 years ago

D063520 commented 5 years ago

When importing for example first P805 and then P1343 the import will fail because in "Luxembourgish" (a language) the label is the same:

Failed to add P1343 [2019-02-21 16:02:54]: Property [[Property:P207|P207]] already has label "Beschriwwen an" associated with language code lb.

D063520 commented 5 years ago

The solution is to replace in src/EntityImporter in the function createEntity this part:

$result = $this->entityStore->saveEntity( $entity, 'Import entity', $this->importUser, EDIT_NEW | EntityContent::EDIT_IGNORE_CONSTRAINTS );