한국   대만   중국   일본 
? T364263 {{Clickable button 2}} not rendering properly in realtime preview and Visual Editor
Page Menu Home Phabricator

{{Clickable button 2}} not rendering properly in realtime preview and Visual Editor
Open, Needs Triage Public BUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens? : {{Clickable button 2}}({{클릭可能한 버튼2}}) is displayed as a regular link.

What should have happened instead? : {{Clickable button 2}} should be rendered as a button.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.): For Visual Editor, it only seems to affect when using action=edit. The veaction=edit has no problem. There is also no problem with the Show preview button.

In view:

화면 캡처 2024-05-05 123511.png (292×966 px, 32 KB)

In Realtime Preview:

화면 캡처 2024-05-05 123525.png (593×1 px, 52 KB)

In Realtime Preview:(Show preview)

화면 캡처 2024-05-05 225107.png (728×979 px, 79 KB)

In Realtime Preview(Show diff):

화면 캡처 2024-05-05 225125.png (549×976 px, 62 KB)

In Visual Editor(veaction=edit):

화면 캡처 2024-05-05 224620.png (369×983 px, 30 KB)

In Visual Editor(action=edit):

화면 캡처 2024-05-05 224643.png (287×1 px, 28 KB)

Event Timeline

I'm not sure what tag to put on this, but I'll put it like this.

화면 캡처 2024-05-05 225457.png (325×1 px, 25 KB)

There is also an issue with the preview of the 2017 Wikitext Editor. Could this have something to do with Parsoid?

The issue occurred because the mediawiki.ui.button did not load during the preview. I have no idea why the problem happened. As a workaround, you can try the following script:

mw.hook( 'wikipage.content' ).add(function(){
	if ($('.mw-ui-button').length > 0) {
		if (mw.loader.getState('mediawiki.ui.button') === 'registered') {
			mw.loader.load('mediawiki.ui.button');
		}
	}
});