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

Error when creating item on wikibase with federated properties #151

Open
harej opened this issue Nov 4, 2021 · 1 comment
Open

Error when creating item on wikibase with federated properties #151

harej opened this issue Nov 4, 2021 · 1 comment

Comments

@harej
Copy link

harej commented Nov 4, 2021

  • wikibase-cli version: <!-- the latest version, right? :D > 15.15.2
  • OS version: Node version v16.11.1, npm version 8.1.2
  1. Configure the Wikibase CLI to use a Wikibase that uses federated properties such as https://wikipediacitations.wiki.opencura.com/wiki/

  2. Try to create an item. Example command: wb create-entity \'{"type":"item","labels": {"en": "enwiki#308988"}, "descriptions": {"en": "article on English Wikipedia"}, "claims": {"P9675": ["308988"], "P2699": ["https://en.wikipedia.org/w/index.php?curid=308988"], "P1433": ["Q2"]}}'

  3. Error results (partly cut off):

:{"*":"You can not interact with properties using this API while federated properties is enabled"}}],"*":"See https://wikipediacitations.wiki.opencura.com/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &lt;https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&gt; for notice of API deprecations and breaking changes."}} {
  statusCode: 200,
  statusMessage: undefined,
  headers: Headers {
    [Symbol(map)]: [Object: null prototype] {
      server: [ 'nginx/1.17.8' ],
      date: [ 'Thu, 04 Nov 2021 03:13:15 GMT' ],
      'content-type': [ 'application/json; charset=utf-8' ],
      'transfer-encoding': [ 'chunked' ],
      connection: [ 'keep-alive' ],
      vary: [ 'Accept-Encoding' ],
      'x-powered-by': [ 'PHP/7.4.23' ],
      'x-content-type-options': [ 'nosniff' ],
      'mediawiki-api-error': [ 'param-illegal' ],
      'x-frame-options': [ 'DENY' ],
      'content-disposition': [ 'inline; filename=api-result.json' ],
      'cache-control': [ 'private, must-revalidate, max-age=0' ],
      'x-request-id': [ '0a02feb306f60cb3d8498710' ],
      'x-wbstack-mw-backend': [ 'mediawiki-135-app-api' ],
      'strict-transport-security': [ 'max-age=15724800; includeSubDomains' ],
      'content-encoding': [ 'gzip' ]
    }
  },
  body: {
    error: {
      code: 'param-illegal',
      info: 'You can not interact with properties using this API while federated properties is enabled',
      messages: [
        {
          name: 'wikibase-federated-properties-local-property-api-error-message',
          parameters: [],
          html: {
            '*': 'You can not interact with properties using this API while federated properties is enabled'
          }
        }
      ],
      '*': 'See https://wikipediacitations.wiki.opencura.com/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &lt;https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&gt; for notice of API deprecations and breaking changes.'
    }
  },
  url: 'https://wikipediacitations.wiki.opencura.com/w/api.php?action=wbgetentities&ids=P9675%7CP2699%7CP1433&format=json&props=info',
  context: {
    url: 'https://wikipediacitations.wiki.opencura.com/w/api.php?action=wbgetentities&ids=P9675%7CP2699%7CP1433&format=json&props=info',
    body: {
      error: {
        code: 'param-illegal',
        info: 'You can not interact with properties using this API while federated properties is enabled',
        messages: [
          {
            name: 'wikibase-federated-properties-local-property-api-error-message',
            parameters: [],
            html: {
              '*': 'You can not interact with properties using this API while federated properties is enabled'
            }
          }
        ],
        '*': 'See https://wikipediacitations.wiki.opencura.com/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &lt;https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&gt; for notice of API deprecations and breaking changes.'
      }
    }
  }
}
@maxlath
Copy link
Owner

maxlath commented Nov 4, 2021

I haven't looked at FederatedProperties yet, I guess some adaptation would be required in wikibase-edit to support it: I opened an issue on that matter maxlath/wikibase-edit#75

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

2 participants