Page MenuHomePhabricator

On Wikibase.cloud Cradle instance some entity searches erroneously search wikidata.org
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What should have happened instead?:
Instead, I expect the fields only to return local items and to have working URIs.

To do on our end:

  • Investigate further into the issue and specify what we need
  • Reach out to Magnus to align on an approach to solve it (i.e. propose fix or specify the problem)

Event Timeline

I can only imagine that the match you are getting is https://www.wikidata.org/wiki/Q34433 from Wikidata and that this is one part of the version of cradle that is running on cloud that is not yet wikibase agnostic.

And regarding the second bullet point issue, the image showing the incorrect URL is below.
But this ticket should be split into 2 separate tickets, especially as i expect these issues will have different solutions.

image.png (438×1 px, 42 KB)

Martsniez updated the task description. (Show Details)

Moved the second issue to https://phabricator.wikimedia.org/T317173 and removed the steps to reproduce that issue from first post.

Martsniez renamed this task from Wikibase.cloud cradle includes other peoples Wikibases and messes up URIs to Wikibase.cloud cradle includes other Wikibase.Sep 7 2022, 7:15 AM

@Addshore do we need triage on this to get the ball rolling on fixing the use of Cradle for Wikibase.cloud?

@Martsniez thats all for @Evelien_WMDE
As far as I can see it is currently in the correct column on the correct work board to get looked at

Tarrow renamed this task from Wikibase.cloud cradle includes other Wikibase to On Wikibase.cloud Cradle instance some entity searches erroneously search wikidata.org.Feb 23 2023, 10:54 AM

At first glance it appears that the issue is that a WikiData object is made that is hardcoded to use the wikidata apis.

This is derived from a forked version of the upstream "magnustools" library. Probably a change needs specifically to be made here. However, we should also investigate if there is a new version with a fix from upstream (and also if there are upstream updates we need in future.

n.b. this JS library is loaded using composer with a script to copy the js resources into the public_html folder during the composer install/update step during the Docker build time. We might also wish to change this pattern and have these extra resources checked into the repo simply for clarity

I believe the issue stems from Seems to be [https://github.com/wbstack/magnustools/blob/2c2e4128132ac7f943934fa909fa9da7b07e0138/public_html/resources/vue/typeahead-search.html#L118 ypeahead-search.html L118] and L135. Which are hard coded to wikidata.org.

The WikiData object mentioned above is handled using the set_custom_api call.

Thanks for this. As I commented on the PR at a very high level this patch works but then it goes on to create "broken items"; ones where the namespace is included in the id. The values added by this patch look like this

image.png (532×966 px, 34 KB)

Unfortunately the wikibase api doesn't reject this malformed content either for which I have opened a separate bug: T338223

I will take a quick look and see if some trivial adjustment to magnustools, cradle or widar can prevent this happening.

Tarrow removed Tarrow as the assignee of this task.Jun 8 2023, 9:14 AM
Tarrow moved this task from Kanban board Q2 2023 to Ready to Pick Up on the Wikibase Cloud board.

Some new reflections added to the github PR trying to pinpoint the remaining issue.
Also added a patch for fixing mismatched namespaces (0/120 -> 120/122).

@Tarrow If you remember how you got a local testing environment to work I can try to test if this solves the issue.

hey @Fring this ticket is not the highest in the todo column but since you just worked on another cradle ticket i think it could make sense for you to pick up this one next to reduce context switching. what do you think?