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

Logged-in Wikidata edits fail #291

Open
Tracked by #257
diegodlh opened this issue Sep 10, 2024 · 1 comment
Open
Tracked by #257

Logged-in Wikidata edits fail #291

diegodlh opened this issue Sep 10, 2024 · 1 comment
Labels
bug Something isn't working wikidata Zotero 7

Comments

@diegodlh
Copy link
Owner

Describe the bug
Syncing local citations to Wikidata fail if username and password are used.

To Reproduce

  1. Create Zotero item for Wikidata Sandbox 1, with QID Q4115189
  2. Locally, add citation to Wikidata Sandbox 2, with QID Q13406268
  3. Sync citations with Wikidata using your Wikidata account username and password

Expected behavior
The corresponding "cites work" statement should be created in Wikidata. Instead, a "Some changes could not be uploaded" error is shown.

Screenshots
image

Environment:

  • Zotero version: Zotero 7
  • Cita version: zotero7 development branch
  • OS name and version: Linux

Additional context
Note that edits do succeed if done anonymously (i.e., no username and password given).

The error seems to originate in wikibase-edit's login.js, here. res.headers.get('set-cookie') returns null.

My guess is that this may be related to wikibase-edit no longer using cross-fetch since v7. See maxlath/wikibase-edit@5959717

We used to have a cross-fetch patch that addressed the fact that parsing set-cookies headers was failing. This was reported to wikibase-edit here: maxlath/wikibase-edit#62

@diegodlh diegodlh added bug Something isn't working wikidata Zotero 7 labels Sep 10, 2024
@diegodlh
Copy link
Owner Author

Note that Zotero's debug console is showing multiple Some cookies are misusing the recommended “SameSite“ attribute warnings apparently linked to our requests to Wikidata's API.

Because these are just warnings, I don't think they are related to this bug. However, it may be worth it reporting them to wikibase-edit if they persist after we have solved this issue, as it may become a problem in the future, as mentioned in the warning.

@diegodlh diegodlh mentioned this issue Sep 18, 2024
38 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wikidata Zotero 7
Projects
None yet
Development

No branches or pull requests

1 participant