Page MenuHomePhabricator

<citation> elements treated as divs instead of inline elements
Closed, ResolvedPublic

Description

It seems that something has changed with <citation> parsertags of the CiteThisPage extension. These used to present inline output, but now seem to generate div blocks. This can be seen on this Example, where the dates are now on a separate line, where they were not before.

Event Timeline

TheDJ created this task.Jul 22 2017, 7:11 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 22 2017, 7:11 PM
Josve05a updated the task description. (Show Details)Oct 13 2017, 7:27 PM

Last non-documentation code change was https://gerrit.wikimedia.org/r/#/c/319911/ nine months ago. Has it been broken for that long without us noticing or is it more recent?

TheDJ added a comment.Oct 13 2017, 8:41 PM

Last non-documentation code change was https://gerrit.wikimedia.org/r/#/c/319911/ nine months ago. Has it been broken for that long without us noticing or is it more recent?

@Jdforrester-WMF very likely already broken for that long. It's not a page that too many people keep an eye on, and more casual readers might just think it's 'weird' instead of broken.

TheDJ added a comment.Oct 13 2017, 8:43 PM

Lol, no it's simple:

<div class="mw-parser-output">13 Oct. 2017</div>

So it's because it inserts random pieces of parser-output into the line.

matmarex claimed this task.Oct 13 2017, 9:11 PM
matmarex added a subscriber: matmarex.

Wow, the way CiteThisPage makes this tag work is actually insane.

Change 384173 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/CiteThisPage@master] Suppress wrapping <div class="mw-parser-output"> around our <citation> tags

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

Change 384173 merged by jenkins-bot:
[mediawiki/extensions/CiteThisPage@master] Suppress wrapping <div class="mw-parser-output"> around our <citation> tags

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

Jdforrester-WMF closed this task as Resolved.Oct 13 2017, 9:38 PM
Jdforrester-WMF removed a project: Patch-For-Review.

OK, this is now fixed in master, and the fix will roll out to all wikis in the normal way (so fixed for the English Wikipedia on Thursday).

TheDJ awarded a token.Oct 17 2017, 6:18 AM
Speravir removed a subscriber: Speravir.May 20 2019, 9:20 PM
jhsoby reopened this task as Open.May 4 2020, 10:01 AM
jhsoby added a subscriber: jhsoby.

I'm seeing this exact issue now, e.g. on https://en.wikipedia.org/w/index.php?title=Special:CiteThisPage&page=Nauru&id=954769756&wpFormIdentifier=titleform . Some form of regression? Seems like the <citation> tags get converted to <p>. (What kind of tag is <citation> anyways? I can't find any documentation for it, the closest I can find is HTML5's <cite> tag, which is meant for work titles. Probably the best solution is to just remove those tags from enwiki.)

I'm seeing this exact issue now, e.g. on https://en.wikipedia.org/w/index.php?title=Special:CiteThisPage&page=Nauru&id=954769756&wpFormIdentifier=titleform . Some form of regression? Seems like the <citation> tags get converted to <p>. (What kind of tag is <citation> anyways? I can't find any documentation for it, the closest I can find is HTML5's <cite> tag, which is meant for work titles. Probably the best solution is to just remove those tags from enwiki.)

This is a new issue: T250807. Basically, on enwiki, the <citation> tags are enclosed within {{#time}} function and the function comes with <p> tags.

jhsoby closed this task as Resolved.May 4 2020, 10:24 AM

Ah, ok. Closing this again then.