Recently, I have installed a MediaWiki instance locally on a virtual machine that I own. I have also installed VisualEditor, which is working fine.
As I and the future users of this wiki will need to insert references to document the web pages being written, I wanted to install the citation tool (https://www.mediawiki.org/wiki/VisualEditor/Citation_tool) to have something similar to what is being used on Wikipedia.
I have followed the steps carefully:
- I have installed Scribunto, ParserFunctions, Cite and TemplateData;
- I have imported some templates (e.g. Template:Cite_web) from Wikipedia, by using, respectively, the export and the import tools;
- I have specified the configuration message needed for the tool (MediaWiki:Visualeditor-cite-tool-definition.json).
When I use the VisualEditor tool, I see the "Cite" button and the different templates are listed. However, when I select any of the listed templates, no data appears (the template is empty).
In accordance with the troubleshooting part (https://www.mediawiki.org/wiki/VisualEditor/Citation_tool#Troubleshooting), I have tried to make a null edit the content of both the documentation page (e.g. Template:Cite_web) and the source page (e.g. Template:Cite_web/doc) by clicking on Edit then saving directly. This didn't help.
Also, I have tried to follow the different indications on this topic which deals with the same issue, but nothing worked so far.
This problem seems to be related to this bug (https://phabricator.wikimedia.org/T52372), however, the null edit does not resolve the issue.
The following API call is done when I try to open e.g. the web template from the Cite button:
"api.php?action=templatedata&format=json&titles=Template%3ACite web&lang=en&formatversion=2&doNotIgnoreMissingTitles=1&redirects=1"
Which results to this response:
"{
"batchcomplete": true,
"warnings": {
"main": {
"warnings": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
},
"templatedata": {
"warnings": "The parameter \"doNotIgnoreMissingTitles\" has been deprecated."
}
},
"pages": {
"23": {
"title": "Template:Cite web",
"notemplatedata": true,
"params": []
}
}
}"
Notice that when I click on "Cite" button, I select a template (e.g. Web) and I click on "Insert" even if the template is empty, a reference number is added in the text, but I have an error linked with Lua that is displayed.
Indeed, the file Module:Citation/CS1/styles.css has the following problem:
"Script error: Lua error at line 1: unexpected symbol near '/'."
The file, which comes from Wikipedia (https://en.wikipedia.org/wiki/Module:Citation/CS1/styles.css), has not been modified. By the way, if I remove all the comments, a similar error appears with the code.
Does anyone has any clue on this issue? I really need citation tool to work before adding any content on the wiki, otherwise it will be such a pain to manually add all the references or to update the pages a posteriori.
***Configuration***
Operating system: Ubuntu 18.04.1 LTS
Server: Apache2
MediaWiki: 1.31.1 (590e94d)
PHP: 7.2.10
Lua: 5.1.5
***Extensions***
VisualEditor: 0.1.0 (13a585a) - 5/30/2018
WikiEditor: 0.5.1 (277159c) - 5/5/2018
Cite: - (20e26df) - 4/17/2018
ParserFunctions: 1.6.0 (f2c63e5) - 10/15/2018
Scribunto: both the latest version for REL1_31 and (cdf41bb) - 11/22/2018
TemplateData: 0.1.2 (0cffe4a) - 10/15/2018
Bootstrap: 1.2.3