Page MenuHomePhabricator

References aren't readable to unprivileged users on Wikidata when an item is protected
Closed, ResolvedPublic8 Story Points

Description

Acceptance Criteria

  • references should be readable to unprivileged users on Wikidata when an item is protected
  • browser test for expected behaviour of references with protected items

Task Description

Try visiting https://www.wikidata.org/wiki/Q6691 when logged out - the links for the references are greyed out, and you can't click on them to display the reference. The same thing happens at https://www.wikidata.org/wiki/Q5 - but they work fine at https://www.wikidata.org/wiki/Q1513315 . And if you are logged in and view the same pages, they work fine.

It looks like this is related to whether the Wikidata entry is protected from editing or not (possibly just semi-protection?). However, page protection should not affect what information is visible on the Wikidata entry!

This issue was originally pointed out by Fram at:
https://en.wikipedia.org/wiki/Wikipedia_talk:Wikidata/2018_State_of_affairs/Archive_1#References_invisible_on_protected_Wikidata_items_when_not_logged_in?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 30 2018, 2:30 PM

The fix for the other bug should now be deployed.
Thiemo says the code to fix this should be very similar to the one fixing T182767.

T182767: Can't see references on historic revisions of items on Wikidata is finally fixed (workaround removed). Now though no simple CSS workaround can be applied.

Pablo-WMDE added a subscriber: Pablo-WMDE.EditedJul 27 2018, 1:56 PM

Just encountered this today: https://www.wikidata.org/wiki/Q39259 Ironic to not see the sources on - apparently - disputed data in particular.

Pablo-WMDE updated the task description. (Show Details)Jul 27 2018, 2:01 PM

I was looking into it this morning. The problem is in StatementHtmlGenerator.php on line 100:

view/src/StatementHtmlGenerator.php
$references->isEmpty() ? '' : 'wikibase-initially-collapsed'

This makes all references initially collapsed on all views. This is achieved using CSS, which on the other hand explicitly excludes diffs and old revisions:

view/resources/wikibase/wikibase.less
.client-js body:not( .wb-diffpage ):not( .wb-oldrevpage ) .wikibase-initially-collapsed {
    display: none;
}

For T196423, we could exclude another CSS class, mw-special-Undelete. But there's no CSS class for protected pages. Note that the rendering depends on the viewing user. For some users, the references should visible as usually, for the rest, they should be inactive and visible. This needs to be considered not to break HTML caching.

Nikki added a subscriber: Nikki.Aug 8 2018, 11:25 AM

The issue was mentioned again here.

and even logged-in users also faced-to-faced this issue

matej_suchanek renamed this task from References aren't readable to logged-out users on Wikidata when an item is protected to References aren't readable to unprivileged users on Wikidata when an item is protected.Oct 21 2018, 9:20 AM

@Lydia_Pintscher Can be bring this to Camp soon?

Addshore triaged this task as Normal priority.Nov 13 2018, 2:41 PM
Addshore set the point value for this task to 8.
Addshore updated the task description. (Show Details)Nov 13 2018, 3:01 PM

Change 474301 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Fix hidden references on protected items

https://gerrit.wikimedia.org/r/474301

Addshore moved this task from incoming to in progress on the Wikidata board.Nov 21 2018, 8:19 AM

Change 476075 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/WikibaseLexeme@master] Adjust for upstream rename of private method

https://gerrit.wikimedia.org/r/476075

Restricted Application added a project: User-Michael. · View Herald TranscriptNov 27 2018, 6:08 PM

Change 476247 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Remove temporary method used for ci-migration

https://gerrit.wikimedia.org/r/476247

Change 474301 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Fix hidden references on protected items

https://gerrit.wikimedia.org/r/474301

Change 476075 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Adjust for upstream rename of private method

https://gerrit.wikimedia.org/r/476075

Change 476247 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Remove temporary method used for ci-migration

https://gerrit.wikimedia.org/r/476247

That's awesome, people will be happy. When will it be deployed?

@Lea_Lacroix_WMDE Seems to be deployed:

I think that's my workaround. Can't say for sure though.

This seems to be deployed to beta: https://wikidata.beta.wmflabs.org/wiki/Q503104
But not yet on test: https://test.wikidata.org/wiki/Q120085

Hence, I would assume that it is not live either. (check: https://www.wikidata.org/wiki/Q39259 )

Lea_Lacroix_WMDE reopened this task as Open.Dec 4 2018, 1:00 PM

Just tested, I still encounter the issue when logged out.
If you don't mind I'll keep it open and in the Needs Announcement column until I make sure that it's live and announce it :)

Hey! I just tested it with Human and realized that the reference section is unfolded by default, with no possibility to fold it.
This is different from the behaviour of the non-protected pages, where the content of references is folded (which makes sense especially when the content is very long), and one can click on "X references" to expand it.
Can we make the reference section folded by default?

Hey @Lea_Lacroix_WMDE,
that looks still like the workaround put in place by @Ladsgroup . When deployed, the references on protected pages should fold like on every other page as well. It doesn't look like this change is on the production or even test instance yet.

Actually it's testable in beta cluster: https://wikidata.beta.wmflabs.org/wiki/Q488197
(I just protected it for autoconfirmed users. Log out and try it out.)

Fancy \o/
Any idea when it's going to be deployed?

Fancy \o/
Any idea when it's going to be deployed?

As I understand the tag on this task, the patch should be part of 1.33.0-wmf.8 and that should be live on all wikis on Thursday: https://phabricator.wikimedia.org/T206662 (as least that is my impression)

Wikidata is in group1, meaning this will be live on Wednesday noonish if everything goes as expected. See https://wikitech.wikimedia.org/wiki/Deployments

Wikidata is in group1, meaning this will be live on Wednesday noonish if everything goes as expected. See https://wikitech.wikimedia.org/wiki/Deployments

Even better :)

It's deployed and it works well \o/ Example https://www.wikidata.org/wiki/Q6691
I think that @Ladsgroup's workaround is still in place on some items, like https://www.wikidata.org/wiki/Q5, can we disable it now?

It's not deployed yet (according to Special:Version, wikidata is still on wmf.6) It will be deployed in two hours.

Now the change is live (see Q39259) and we can disable the workaround :)

I rollbacked the workaround \o/

Deployed, announced, thanks for fixing this annoying bug \o/