Page MenuHomePhabricator

Text extracts unable to summarise content contains {{dts}} templates
Closed, ResolvedPublic

Description

Both the preview on android and the hovercard for the web will incorrectly render a dts [1] template. See https://en.wikipedia.org/wiki/Melodie_(album) for instance.

Android Version 5.0, stock TouchWiz on Galaxy S 5. The web issue was the standard web version and the app version was from the app. Wikipedia app v2.0.110, and the browser was the latest stable version of Chrome for Windows 10 x64, don't know the exact version as I'm not at home atm.

Here's an image of the error. The issue looks identical on Chrome. http://i.imgur.com/Q3Qq3Nw.jpeg

[1] https://en.m.wikipedia.org/wiki/Template:Dts

Related Objects

Event Timeline

Krimin-killr21 raised the priority of this task from to Needs Triage.
Krimin-killr21 updated the task description. (Show Details)
Krimin-killr21 subscribed.

Hi @Krimin-killr21,
thanks for taking the time to report this!

Unfortunately this report is not very useful because it does not describe the problem well. If you have time and can still reproduce the problem, please add a more useful and complete description to this report by providing Android version information, browser information, and if you use the mobile version of English Wikipedia or the standard version. Thanks.

Of course, thanks for the tips.

Android Version 5.0, stock TouchWiz on Galaxy S 5. The web issue was the standard web version and the app version was from the app. Wikipedia app v2.0.110, and the browser was the latest stable version of Chrome for Windows 10 x64, don't know the exact version as I'm not at home atm.

Here's an image of the error. The issue looks identical on Chrome. http://i.imgur.com/Q3Qq3Nw.jpeg

Jdlrobson renamed this task from Preview on Android and hovercard on web incorrectly render {{dts}} templetes to Text extracts unable to summarise content contains {{dts}} templates.Sep 16 2015, 6:22 PM
Jdlrobson triaged this task as Low priority.
Jdlrobson updated the task description. (Show Details)
Jdlrobson set Security to None.
Jdlrobson subscribed.

Things to investigate:

  • Number of pages impacted
  • Whether this is due to invalid use of the API.

It's a simple problem without simple solution. {{dts}} uses invisible <span class="sortkey" style="display:none"> tag, but TextExtracts can't remove display:none tags now. But it can remove tags by classes.

So, there is two fast solutions:

  1. Edit {{dts}} and replace class="sortkey" with class="sortkey noprint"
  2. Add .keysort class into TextExtracts list of tags that should be removed

@Krimin-killr21 Is keysort class used often in the introduction?

So, there is two fast solutions:

  1. Edit {{dts}} and replace class="sortkey" with class="sortkey noprint"
  2. Add .keysort class into TextExtracts list of tags that should be removed

I'd vote for #1 except that I'd add the noexcerpt class rather than noprint. It seems we already have a mechanism for signalling that information shouldn't be in extracts.

I'd vote for #1 except that I'd add the noexcerpt class rather than noprint. It seems we already have a mechanism for signalling that information shouldn't be in extracts.

On closer inspection, TextExtracts strips both noexcerpt and noprint. I believe noexcerpt would be more accurate in this case though.