Page MenuHomePhabricator

Wikibase QuickStatements incorrectly assumes HTTP for unit item IRIs
Closed, ResolvedPublicBUG REPORT

Description

Problem:
In Wikibase instances on https://www.wikibase.cloud/ QuickStatements where unit information is given fail to execute because the Uxxx in the QuickStatements gets expended to the wrong entity IRI, which uses the HTTP as on Wikidata instead of HTTPS in Wikibase installations.

List of steps to reproduce (step by step, including full links if applicable):

  • create QuickStatements with a literal with unit information, something like
CREATE

LAST	P1	Q2
LAST	Den	"chemical compound"
LAST	P12	"CN(CC1=CN=CC=C1)C(=O)C2=NOC(=C2)COC3=CC4=C(CCCC4)C=C3"	S14	Q5
LAST	P3	"C₂₂H₂₃N₃O₃"	S14	Q5
LAST	P2	377.4372U3	S14	Q5
LAST	P9	"InChI=1S/C22H23N3O3/c1-25(14-16-5-4-10-23-13-16)22(26)21-12-20(28-24-21)15-27-19-9-8-17-6-2-3-7-18(17)11-19/h4-5,8-13H,2-3,6-7,14-15H2,1H3"	S14	Q5
LAST	P10	"MPDNXORLVWKNOG-UHFFFAOYSA-N"
LAST	P13	"24793226"	S14	Q4

(Obviously, the exact P/Q-ids will differ per Wikibase)

What happens?:
Executing these QuickStatements on a Wikibase will expand the U3 to http://compoundcloud.wikibase.cloud/entity/U3

image.png (385×1 px, 197 KB)

What should have happened instead?:
The expanded IRI should use HTTPS instead of HTTP. It should be: https://compoundcloud.wikibase.cloud/entity/U3

Event Timeline

Tarrow subscribed.

Moved back to here because it doesn't appear like this is going to get worked on shortly and we believe while this is technical it is fundamentally a product topic

Addshore subscribed.

It sounds like the problem here might lie entirely within quickstatements from my understanding?
It looks like quickstatements does this mapping based on configuration
And the configuration that wbstack code provides is just wrong

Took a quick look and I guess this broke are the wbstack -> wikibase.cloud transition

https://github.com/wbstack/magnustools/pull/11

Once this is merged, It would need to be used in quick statements, and tested with the above example

We (me and Tom) discovered a few things:

  • magnustools version in composer.lock is still from 2021 which is this commit.
  • When we ran composer update this pulled in packages that depends on php version > 7.4
  • We may want to update quickstatements.

We have updated to a new version of magnustools with https://github.com/wbstack/quickstatements/pull/137 and will now try this on staging.

It was rather difficult to confirm locally because the concept URIs locally use https still but the actual requests use http

We tested this on staging by using the new image with reference to sha256:13d4a3531190c471445ca0ea2a7c1afee6f6d521b22a5a5b52f9426d47c5206a by running kubectl edit deployment/tool-quickstatements

This is an example:
Create 2 items, and 1 Property (type Quantity)

qid,P2
Q1,1U2

The bug is fixed but we should use https locally. The patch will not work on local dev env because http is still being used locally.

@EgonWillighagen Could you please check if the issue resolved?