Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help with starting to use Wikibase import #47

Open
Rik44444 opened this issue Mar 29, 2020 · 6 comments
Open

help with starting to use Wikibase import #47

Rik44444 opened this issue Mar 29, 2020 · 6 comments

Comments

@Rik44444
Copy link

Rik44444 commented Mar 29, 2020

Hi, thanks for developing and maintaining this extension, it will be really really useful for me once i get it to work!

So atm i'm getting an error. Steps to reproduce (i followed https://github.com/filbertkm/WikibaseImport):

  • install Wikibase 1.34
  • install Wikibaseimport extension (i tried cloning version 1.34, but got an error that did not exist, so went with the master)
  • run composer update in WikibaseImport folder
  • add wfLoadExtension( 'WikibaseImport' ); to LocalSettings.php
  • run php maintenance/update.php
  • import an example entity, e.g. Samsung from Wikidata: https://www.wikidata.org/wiki/Q20716 , by entering:
    ~/mydomain/w/extensions/WikibaseImport $ phpmaintenance/importEntities.php --entity Q20716

Expected result:

  • import of item Q20716 from Wikidata to my Wikibase repo

Actual result:

  • no import + following error:

[1c3bcba28243820e0d31340f] [no req] Error from line 155 of /home/mydomain/w/extensions/WikibaseImport/src/EntityImporter.php: Call to undefined method Wikibase\DataModel\Entity\Item::getSiteLinks()
Backtrace:
#0 /home/mydomain/w/extensions/WikibaseImport/src/EntityImporter.php(185): Wikibase\Import\EntityImporter->getBadgeItems(array)
#1 /home/mydomain/w/extensions/WikibaseImport/src/EntityImporter.php(69): Wikibase\Import\EntityImporter->importBadgeItems(array)
#2 /home/mydomain/w/extensions/WikibaseImport/maintenance/importEntities.php(78): Wikibase\Import\EntityImporter->importEntities(array)
#3 /home/mydomain/w/maintenance/doMaintenance.php(99): Wikibase\Import\Maintenance\ImportEntities->execute()
#4 /home/mydomain/w/extensions/WikibaseImport/maintenance/importEntities.php(133): require_once(string)
#5 {main}

I also have a bonus question: nowhere have i entered "wikidata.org", so how does the extension know that i want an item from WikiData? + How do i enter a different URL when i want to import items from a different Wiki repo?

@maxchu2021
Copy link

maxchu2021 commented Apr 7, 2020

I've got this issue also.

I can only do "php maintenance/importEntities.php --all-properties" this one. But others have the same issue as above.

@danmichaelo
Copy link

This seems to be an actual compatibility issue.

The Item::getSiteLinks() method was removed in wikibase/data-model 8.0 (2018-08-03), so WikibaseImport needs to be updated to use getSiteLinkList() instead.

@danmichaelo
Copy link

Oh, and there is already a PR that fixes it: #45

@Rik44444
Copy link
Author

is there anything i can do to help in getting this fixed?

@danmichaelo
Copy link

There is a working fork at https://github.com/Wikidata/WikibaseImport

@Rik44444
Copy link
Author

ah brilliant! i will try that asap. many thanks @danmichaelo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants