Page MenuHomePhabricator

{{Special:NewPages|hidepatrolled=1}} transclusion does not work properly any more (incorrectly shows all new pages)
Closed, DeclinedPublic

Description

Hello.
A couple of days (maximum week or two) the new pages special page transclusion stopped work properly. The code

{{Special:NewPages|hidepatrolled=1}}

shows all the new pages, not just not patrolled, and the "not-patrolled" css style does not highlight them.
Thank you

Event Timeline

IKhitron triaged this task as Medium priority.Jul 4 2016, 1:10 PM
Aklapper renamed this task from Special:NewPages transclusion does not work properly any more to {{Special:NewPages|hidepatrolled=1}} transclusion does not work properly any more (incorrectly shows all new pages).Jul 4 2016, 4:58 PM
Aklapper added a project: Regression.

Works for me locally:

pasted_file (958×1 px, 446 KB)

Probably you should give us clear steps how to reproduce the problem, what the problem is (e.g. by mentioning what the expected result and what the current result is). Probably you've an example page somewhere? :)

Thanks!

It also works for me locally but doesn't at mediawiki.org (tested at https://www.mediawiki.org/wiki/User:Glaisher/sandbox) so supposedly this is a WMF-specific issue?

@Florian, your screenshot prooves that there is a problem - all these yellow pages should not be here.
I just add this code to some page and see all new pages, not just unpatrolled, and without highlighting, not like you do. I expect to see only the new unpatrolled pages, as I allways did. And it happenes at my wiki.

@Florian, your screenshot prooves that there is a problem - all these yellow pages should not be here.
I just add this code to some page and see all new pages, not just unpatrolled, and without highlighting, not like you do. I expect to see only the new unpatrolled pages, as I allways did. And it happenes at my wiki.

My screenshot says: This is working on my local wiki :) The first inclusion (above the "----") shows all changes, which aren't patrolled, and the second transclusion shows all pages, no matter if patrolled or not. That#s exactly the result I expect when using the wikitext:

{{Special:NewPages|hidepatrolled=1}}
----
{{Special:NewPages|hidepatrolled=0}}

However, @Glasiher already tested in a wmf wiki, and it seems to be not working. You said "happens at my wiki", so I assume it's not a wmf wiki? If so, could you provide some data about your wiki, e.g.:

  • MediaWiki version
  • installed extensions
  • php version
  • maybe a public url?
  • Parser/Cache related configuration options (or an anonymized paste of your LocalSettings.php) of your LocalSettings.php

Thanks!

Sorry, @Florian, I'm on mobile, the screen was not big enough to see these two code lines. I hope you'll forgive me. My wiki is hewiki, and I think you can get a lot of information you asked at :he:special:version. About php - I do not think I can access it.

No need to forgive anything, I just mentioned what I meant with my screenshot, I did not want to offend you :) Yes, if it's a wmf wiki, I can get these information by myself (in fact, I know them), I thought you run your own wiki, because you said "your wiki" :)

Hmm, the data in the database looks ok (as long as the replica is actual):

MariaDB [mediawikiwiki_p]> SELECT rc_title,rc_timestamp,rc_patrolled FROM `recentchanges` INNER JOIN `page` ON ((page_id=rc_cur_id)) WHERE rc_new = '1' AND rc_namespace = '0' AND rc_patrolled = '0' AND page_is_redirect = '0' ORDER BY rc_timestamp DESC LIMIT 51;
+------------------------------------------------------------------------------------+----------------+--------------+
| rc_title                                                                           | rc_timestamp   | rc_patrolled |
+------------------------------------------------------------------------------------+----------------+--------------+
| Spelade_spel                                                                       | 20160730195644 |            0 |
| VisualEditor/Survey_2015/ru                                                        | 20160730064802 |            0 |
| Wikibase/User_Guide/mk                                                             | 20160729220447 |            0 |
| Wikibase/mk                                                                        | 20160729220416 |            0 |
| Universal_Language_Selector/Compact_Language_Links/id                              | 20160728223213 |            0 |
| Universal_Language_Selector/Compact_Language_Links/Announcement_draft_June_2016/id | 20160728202349 |            0 |
| ORES_review_tool/pt                                                                | 20160726072304 |            0 |
| Phabricator/th                                                                     | 20160725230246 |            0 |
| How_to_contribute/my                                                               | 20160725165753 |            0 |
| Account_creation/it                                                                | 20160725032850 |            0 |
| Account_creation/pt                                                                | 20160724195126 |            0 |
| Content_translation/pt                                                             | 20160724195054 |            0 |
| MediaWiki_1.27/nl                                                                  | 20160724123507 |            0 |
| Interlanguage_links/gl                                                             | 20160722131606 |            0 |
| ORES_review_tool/es                                                                | 20160722025152 |            0 |
| Phabricator/Bots/es                                                                | 20160722024932 |            0 |
| Community_Engagement_(Product)/ht                                                  | 20160720022428 |            0 |
| Edit_Review_Improvements/pt-br                                                     | 20160719224621 |            0 |
| MediaWiki_1.27/pt-br                                                               | 20160719224344 |            0 |
| Writing_systems/Syntax/pt-br                                                       | 20160719223818 |            0 |
| Universal_Language_Selector/Compact_Language_Links/pt-br                           | 20160719223543 |            0 |
| UnicodeJS/pt-br                                                                    | 20160719200157 |            0 |
| Social_media/pt-br                                                                 | 20160719195823 |            0 |
| Edit_Review_Improvements/it                                                        | 20160719193158 |            0 |
| VisualEditor/Roadmap/Update_2016-06-23/it                                          | 20160719193130 |            0 |
| MediaWiki_1.27/it                                                                  | 20160719193020 |            0 |
| Writing_systems/Syntax/it                                                          | 20160719192448 |            0 |
| Universal_Language_Selector/Compact_Language_Links/it                              | 20160719192049 |            0 |
| UnicodeJS/it                                                                       | 20160719191932 |            0 |
| Edit_Review_Improvements/es                                                        | 20160719184040 |            0 |
| Wikimedia_Apps/Team/Retrospectives/2016-07-18                                      | 20160719184022 |            0 |
| VisualEditor/Roadmap/Update_2016-06-23/es                                          | 20160719184020 |            0 |
| Writing_systems/Syntax/es                                                          | 20160719183631 |            0 |
| Edit_Review_Improvements/pt                                                        | 20160719182854 |            0 |
| VisualEditor/Roadmap/Update_2016-06-23/pt                                          | 20160719182725 |            0 |
| MediaWiki_1.27/pt                                                                  | 20160719182645 |            0 |
| Writing_systems/Syntax/pt                                                          | 20160719182306 |            0 |
| Universal_Language_Selector/Compact_Language_Links/pt                              | 20160719181958 |            0 |
| UnicodeJS/pt                                                                       | 20160719181809 |            0 |
| Social_media/pt                                                                    | 20160719181349 |            0 |
| Wikimedia_Research/Design_Research/Reading_Team_UX_Research/iOS_Guerilla_Testing   | 20160719170921 |            0 |
| Content_translation/tr                                                             | 20160719103718 |            0 |
| Content_translation/pt-br                                                          | 20160719015439 |            0 |
| Toolserver:User:Falitjain:common.js                                                | 20160717111742 |            0 |
| Universal_Language_Selector/Compact_Language_Links/Announcement_draft_June_2016/es | 20160716003814 |            0 |
| Universal_Language_Selector/Compact_Language_Links/es                              | 20160715232715 |            0 |
| MediaWiki_1.28/pt-br                                                               | 20160715215522 |            0 |
| Universal_Language_Selector/Compact_Language_Links/he                              | 20160715210943 |            0 |
| Universal_Language_Selector/Compact_Language_Links/Announcement_draft_June_2016/pt | 20160715125137 |            0 |
| Universal_Language_Selector/fa                                                     | 20160715103202 |            0 |
| Universal_Language_Selector/Compact_Language_Links/fa                              | 20160715102319 |            0 |
+------------------------------------------------------------------------------------+----------------+--------------+

pasted_file (961×1 px, 460 KB)

Ok, after setting wgMiserMode to true (default for all WMF wikis) I can now reproduce the problem locally.

Ok, found the commit which caused this problem: 7730dee63b1d2b7fadcecb8b36a44b2b03031060 (T62561: Don't always disable caching when special pages are transcluded). The problem is, that all transcluded pages are evaluated with the user 127.0.0.1. This user in fact does not have the permission to see the patrol status of a page, so all pages are shown. I'm pretty sure (from the commit message, and from thinking about the problem), that this is the _expected_ bevahiour. A page could be accessed by people who don't have access to the patrol status, and if the transclusion is cached, this could result in a data leak (as the page is evaluated using _your_ user including the patrol status, cached with this state and returned from cache to an user, who shouödn't see this data).

I think this is an invalid (you should access Special:NewPages directly), but I would like to see a comment from @Bawolff first :)

I think this is an invalid (you should access Special:NewPages directly), but I would like to see a comment from @Bawolff first :)

Yeah, we are getting away from per-user special page transclusion. I don't think we are going to change our mind on that.

So options here are either:

  • Close this bug as declined
  • Change it so all users (including anons) are allowed to see which pages are patrolled. (that is $wgGroupPermissions['*']['patrolmarks'] = true; )

If all users were allowed to see which pages are patrolled, then we would be able to re-enable {{Special:NewPages|hidepatrolled=1}}

Thank you for the explanations. If so, you should close it indeed.

@IKhitron: Thanks for your understanding :) As a workaround you could at least add a link to Special:NewPages, if you've a "central" user page with all information you need :)

@Bawolff: Thanks for your comment :)