Topic on Talk:Parsoid

Transclusion of tags is not being done correctly

6
Summary by Arlolra

User disappeared

Hwgen22 (talkcontribs)

Hi,


I am trying to use citation tool and Citoid with the VisualEditor to allow easy management of references on my MediaWiki instance.


When I insert a link, Citoid service retrieves correctly the content of the source and build a reference accordingly. However, the following is being added at the end of the reference:

"<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>"


It seems that Parsoid is directly responsible of this bug. Indeed, when I add a reference inside VisualEditor, a POST to the API is being made, which gives the following response:

https://pastebin.com/2JvAh9fL

As you can see, the content is not parsing the templatestyles tags as it should, thus, those are displayed in VisualEditor.

I don't know if the following issues are related, and if so, to what extent:

https://phabricator.wikimedia.org/T88019

https://phabricator.wikimedia.org/T188143

Notice that when I save the edit, the tags are dropped but the reference is still here, as it should.

Does someone know what is causing this issue, and how can I resolve it? Thank you in advance.

SSastry (WMF) (talkcontribs)

Is your wiki public? What versions of Parsoid, MW, and VE do you run?

Arlolra (talkcontribs)
Arlolra (talkcontribs)

Without the TemplateStyles extension, Parsoid won't recognize those tags so they won't be rendered as scripts and just output as literal text as you're seeing.

Hwgen22 (talkcontribs)

Hi @SSastry (WMF), hi @Arlolra,


Thank you for your responses.


Unfortunately, my wiki is hosted locally, on a virtual machine, as I am doing some configuration for now, prior to making it public.


I use MediaWiki 1.31.1, Parsoid 0.9.0 and VisualEditor 0.1.0 (6854ea0).


I already have TemplateStyles extension installed. At least, it shows in Special:Version (version 1.0 (e5da5c0)).


In Parser extension tags, I have the following: "<gallery>, <indicator>, <nowiki>, <pre>, <ref>, <references>, <templatedata> and <templatestyles>".


Can the order of invocation of extensions in LocalSettings.php be a problem? For your information, this is the order that I have:

Cite, ParserFunctions (with and without $wgPFEnableStringFunctions enabled, currently it is disabled), WikiEditor, VisualEditor, <VisualEditor configuration>, <parsoid configuration>, Scribunto, TemplateData, TemplateStyles, <TemplateStyles configutation>, Citoid, <Citoid configuration>.


If the order is not a problem, do you know what could cause such issue? Thank you very much for your help.

Arlolra (talkcontribs)

Hopefully this problem was resolved since the paste above has expired.