Page MenuHomePhabricator

Custom local Share icon inserted next to Mainpage-title wraps into separate line on gomwiktionary main page due to unexpected <p> tags
Closed, ResolvedPublicBUG REPORT

Description

The text inside the h1 header on the main page of the Konkani Wiktionary is enclosed in <p> paragraph tags, while this does not occur, for instance, on the Konkani Wikipedia main page. The problem with this is that the share icon generated by a gadget which should appear to the right of the title, goes below the title.

The title is in two lines for logged-in users, but this is not the trigger for the tags to appear, because the tags occur even when the title is in a single line for logged out users on the Wiktionary, and do not occur when the title is on two lines in the Wikipedia.

g1.png (503×1 px, 140 KB)

g2.png (560×1 px, 170 KB)

The main page on the Konkani Wiktionary is a redirect (in order for the language links to work properly); could this be the cause for the tags?

Event Timeline

Aklapper renamed this task from Unexpected <p> tags in the title on gomwiktionary main page to Custom local Share icon inserted next to Mainpage-title wraps into separate line on gomwiktionary main page.Jan 14 2023, 5:44 PM
Aklapper added a project: Indic-TechCom.

Indeed, custom https://gom.wiktionary.org/w/index.php?title=मिडियाविकी:Mainpage-title-loggedin&action=edit and https://gom.wiktionary.org/w/index.php?title=मिडियाविकी:Mainpage-title&action=edit do not have explicit <p>.

But that is not the issue. The issue is where and how this icon is added/inserted in the DOM:
I cannot reproduce on https://gom.wiktionary.org/wiki/विक्शनरी:मुखेल_पान?debug=true&safemode=1 . So this is custom local on-wiki code, and normally not handled in Phabricator. However, Indic-TechCom has a project tag here, so keeping this ticket open.

I can only reproduce if I enable Dhaktem URL-ak mathallea kuxik tooltip-an dakhoi on https://gom.wiktionary.org/wiki/विशेश:Preferences#mw-prefsection-gadgets .
Per https://gom.wiktionary.org/wiki/मिडियाविकी:Gadgets-definition that's IndicTechComShortUrl[ResourceLoader|default]|IndicTechComShortUrl.js so you can find the code to fix at https://gom.wiktionary.org/wiki/मिडियाविकी:Gadget-IndicTechComShortUrl.js . For support, see https://meta.wikimedia.org/wiki/Tech

@Aklapper , you are right, it is IndicTechComShortUrl.js that inserting the share icon, and the relevant code is:

			if ( currentSkin === "vector" || currentSkin === "vector-2022" || currentSkin === "minerva" ){
				$( '#firstHeading' ).append( icon );
			}

I don't think that there's anything problematic with the gadget itself, from the project's point of view, it's the occurrence of the <p> tags that's unexpected (and new) and is breaking things. I could modify the code to insert the icon inside the <p> tags, but because exactly the same code is used in the Konkani Wikipedia, and other similar derivatives of the parent script are used in other projects; and since I have not found the <p> tags appearing anywhere else in the Wikimedia wikis apart from this one page, I am reluctant to use a variation in the code in this one instance. I think that it's probably better to understand why the <p> tags are appearing, and then decide how to deal with it. To this end, could you please pull in someone (or a project) that could shed light on the appearance of the <p> tags?

The_Discoverer renamed this task from Custom local Share icon inserted next to Mainpage-title wraps into separate line on gomwiktionary main page to Custom local Share icon inserted next to Mainpage-title wraps into separate line on gomwiktionary main page due to unexpected <p> tags.Jan 18 2023, 6:48 PM
The_Discoverer claimed this task.

This issue has gotten resolved by itself :)