Last modified: 2014-09-02 06:04:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T51015, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49015 - reset $wgRestrictDisplayTitle to false and $wgAllowDisplayTitle to true for all wikivoyages
reset $wgRestrictDisplayTitle to false and $wgAllowDisplayTitle to true for a...
Status: NEW
Product: Wikimedia
Classification: Unclassified
Site requests (Other open bugs)
wmf-deployment
All All
: Normal enhancement with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: shell
: 49287 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-31 15:20 UTC by Ryan Holliday
Modified: 2014-09-02 06:04 UTC (History)
14 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Ryan Holliday 2013-05-31 15:20:15 UTC
It looks like some time in the past 36 hours the values for $wgRestrictDisplayTitle and $wgAllowDisplayTitle were changed on English Wikivoyage (see http://en.wikivoyage.org/wiki/Wikivoyage_talk:Banner_Expedition#Not_inhibiting_title).  Could these values be reset to:

$wgRestrictDisplayTitle should be false

$wgAllowDisplayTitle should be true

Thanks!
Comment 1 Bryan Stephenson 2013-05-31 15:41:04 UTC
It's not only en: either. This change also occurred for Portuguese Wikivoyage, which needs the same fix. I imagine that all language versions were affected.
Comment 2 Bryan Stephenson 2013-06-01 17:16:07 UTC
I would consider this to be relatively high priority, as it is causing a large number of pages to display titles in duplicate.
Comment 3 Bartosz Dziewoński 2013-06-01 17:19:13 UTC
Caused by the fix for bug 26547.
Comment 4 Alex Monk 2013-06-01 17:31:15 UTC
Why do you think $wgAllowDisplayTitle has been changed? As far as I can tell that's still true.
Comment 5 Ryan Holliday 2013-06-01 17:57:48 UTC
On English Wikivoyage (and some other language versions) a template was introduced to suppress the main title display and display the title elsewhere in a page banner.  To do so the template uses:

  {{DISPLAYTITLE:<span style="display:none">{{FULLPAGENAME}}</span>}}

...which is valid according to method #2 of http://www.mediawiki.org/wiki/Manual:FAQ#How_do_I_hide_the_main_page_title.3F

However, this approach has recently stopped working, and the title is now display at the top of the page and in the banner.  Since we can't see config variables, it was assumed that either $wgRestrictDisplayTitle or $wgAllowDisplayTitle had changed.  If both of those values are set correctly, is there a reason why hiding the page title no longer works?
Comment 6 Ryan Holliday 2013-06-01 19:43:25 UTC
(In reply to comment #3)
> Caused by the fix for bug 26547.

If I'm understanding that bug correctly, using the approach outlined in http://www.mediawiki.org/wiki/Manual:FAQ#How_do_I_hide_the_main_page_title.3F is no longer a valid way to suppress a page title.  Is there an alternative?  If not, the fix committed for 26547 seems problematic as it breaks functionality that has been documented as a valid way to suppress a page title.

Note: we could obviously suppress the main page title display via CSS, but that cannot be done on a page-by-page basis without a new page-specific CSS rule for each of the hundreds or thousands of pages updated, unless I'm overlooking something.
Comment 7 Bartosz Dziewoński 2013-06-03 08:54:56 UTC
This could be worked around using some different CSS-based hacks – e.g. using "position: absolute; top: -9999px" instead of "display: none" – but there's no guarantee this won't stop working either.

It seems like you guys really should have $wgRestrictDisplayTitle set to false and simply use {{DISPLAYTITLE:}} from then on, as the Wikivoyage banners seem to be a valid use case.
Comment 8 Ryan Holliday 2013-06-04 06:13:15 UTC
(In reply to comment #7)
> It seems like you guys really should have $wgRestrictDisplayTitle set to
> false
> and simply use {{DISPLAYTITLE:}} from then on, as the Wikivoyage banners seem
> to be a valid use case.

I might be misunderstanding, but I edited http://en.wikivoyage.org/wiki/Template:Pagebanner and changed:

{{DISPLAYTITLE:<span style="display:none">{{FULLPAGENAME}}</span>}}

...to:

{{DISPLAYTITLE:}}

...but I still saw the top page title on pages with the banner template.  Did I do something wrong?  Alternately, is there some way to tell whether Wikivoyage currently has $wgRestrictDisplayTitle set to true, which would thus explain why the attempted hack above didn't work?
Comment 9 Bryan Stephenson 2013-06-04 12:56:29 UTC
DISPLAYTITLE doesn´t currently seem to do anything on pt: either.
Comment 10 Bartosz Dziewoński 2013-06-04 18:40:23 UTC
That's because $wgRestrictDisplayTitle is and has always been true. It's just that the hack you were using wasn't disallowed when it clearly should be (and now is).

All of the settings can be seen at https://noc.wikimedia.org/conf/ or in the git repositories.
Comment 11 Bryan Stephenson 2013-06-04 18:50:31 UTC
Maybe Ryan knows, but I don't, so let me ask you, so how do we fix this then? We need the page title to be suppressable by a template, so that the title can be displayed inside the banner only.
Comment 12 torty3 2013-06-07 03:16:25 UTC
I've made a separate request to set $wgRestrictDisplayTitle as false for all Wikivoyages at bug 49287.
Comment 13 Bawolff (Brian Wolff) 2013-06-07 03:33:09 UTC
Given how popular this hack is, perhaps we should introduce a __NOTITLE__ magic word.

To be honest, maybe we should just revert stopping display:none. There are still many ways around it (postition:absolute;top:-500 or display:block;width:0;height:0 or even just color: white. Someone inventive could probably come up with more). However, these alternative approaches become more and more evil, which I don't think we should force people to use. The main point is to avoid tricking people. Since people can only remove letters, the old restrictions more or less accomplishes that.
Comment 14 torty3 2013-06-07 04:04:48 UTC
I'm fine with changing $wgRestrictDisplayTitle to false because we did end up discussing a move away from the actual page name (http://en.wikivoyage.org/wiki/Wikivoyage_talk:Banner_Expedition#Hierarchical_Page_Names and http://en.wikivoyage.org/wiki/Southwest_%28United_States_of_America%29 for example). But a default __NOTITLE__ magic word would definitely be so much easier. Perhaps not feasible given the openness of such an approach.

(In reply to comment #13)
> Given how popular this hack is, perhaps we should introduce a __NOTITLE__
> magic
> word.
> 
> To be honest, maybe we should just revert stopping display:none. There are
> still many ways around it (postition:absolute;top:-500 or
> display:block;width:0;height:0 or even just color: white. Someone inventive
> could probably come up with more). However, these alternative approaches
> become
> more and more evil, which I don't think we should force people to use. The
> main
> point is to avoid tricking people. Since people can only remove letters, the
> old restrictions more or less accomplishes that.
Comment 15 Bawolff (Brian Wolff) 2013-06-07 04:09:23 UTC
>Perhaps not feasible given the openness of such an approach.

What do you mean?
Comment 16 Daniel Friesen 2013-06-07 04:40:12 UTC
(In reply to comment #13)
> Given how popular this hack is, perhaps we should introduce a __NOTITLE__
> magic
> word.
> 
> To be honest, maybe we should just revert stopping display:none. There are
> still many ways around it (postition:absolute;top:-500 or
> display:block;width:0;height:0 or even just color: white. Someone inventive
> could probably come up with more). However, these alternative approaches
> become
> more and more evil, which I don't think we should force people to use. The
> main
> point is to avoid tricking people. Since people can only remove letters, the
> old restrictions more or less accomplishes that.

Actually there's a big difference between display: none; and those other ways of hiding characters.

display: none; practically erases it to the point that it doesn't exist nowhere (well except text browsers that no-one notable uses). You can't select it, if you C&P it won't be copied, and screen readers whom won't render the styles you replace the text with won't see the text and will misread the title.

Those other methods don't. They only visually hide it for people only looking at the formatted text. You can select it, if you copy the plaintext the full title text is present, and they will leave screen readers alone (though one specific mac one won't like overflow+height:0; position+clip:rect is the best way to do it) so blind and deaf readers will still hear the correct titles instead of it being mangled.
Comment 17 Andre Klapper 2013-06-07 10:01:44 UTC
Broadening the summary and moving to site configuration component.
Comment 18 Andre Klapper 2013-06-07 10:02:21 UTC
*** Bug 49287 has been marked as a duplicate of this bug. ***
Comment 19 Tomasz W. Kozlowski 2013-06-07 10:04:25 UTC
(This comment was moved from bug 49287 after a mid-air collision.)

There are 14 Wikivoyage projects out there, and you only gained consensus from 5 communities; I think it is a bit… rude to change settings for the remaining 9 projects without asking their opinion.
Comment 20 Sam Reed (reedy) 2013-06-07 16:18:38 UTC
https://gerrit.wikimedia.org/r/#/c/67455/
Comment 21 Bartosz Dziewoński 2013-06-07 16:26:15 UTC
(In reply to comment #19)
> I think it is a bit… rude to change settings for the
> remaining 9 projects without asking their opinion.

They probably won't mind, as this doesn't disable or change any features, and doesn't require any action on their part whether they wish to make use of the config change in any way or not.

(Also, Reedy's patch was reverted?)
Comment 22 Bryan Stephenson 2013-06-07 16:29:36 UTC
Yeah, all versions had the ability to manipulate the title until bug 26547 was "fixed" the other day, whether they knew it or not. I don't think anyone is going to complain about being given back their newly-lost flexibility.
Comment 23 Tomasz W. Kozlowski 2013-10-06 15:30:59 UTC
What's the state of this? I see that Reedy reverted himself, but I can't find any justification for him doing so; has the patch broken something, or can we go ahead following comment 22?
Comment 24 Ryan Holliday 2013-10-06 15:48:35 UTC
Note that for Wikivoyage language versions that needed this functionality we've ended up using Javascript to suppress the page title, but if it ends up that there is a less hacky way to suppress the title it would be appreciated.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links