Talk:VisualEditor/Citation tool

From MediaWiki.org
Jump to navigation Jump to search

Citoid help[edit]

Does this tool use Citoid? I need a help page for end users on how to use citoid. Citoid is for developers and VisualEditor/Citation tool is only for wiki "builders", so I'm lost. The easiest "help page" I found is w:en:User:Salix alba/Citoid. --Nemo 14:21, 13 February 2015 (UTC)

@Nemo bis: This is documentation for the existing system, not the new one. As the new one isn't finished, obviously there is no documentation on how to extend it. Why do you think you need a help page for end-users to use Citoid when it's not yet deployed? Jdforrester (WMF) (talk) 16:51, 13 February 2015 (UTC)
Well, whether Citoid is used was my first question. :)
There are two tools using Citoid at the moment, so it's not too early to start a help page. But sure, it's understandable that one wasn't created yet. There are some users I need to instruct about the tool, for now I'm using Salix alba's page. --Nemo 23:30, 14 February 2015 (UTC)
@Nemo bis: Please, like we've said to many people several times, do not use the wmflabs demonstration of what the service might look like in actual production. It's abusing API keys that were issued only for testing, and is not appropriate. Jdforrester (WMF) (talk) 03:43, 15 February 2015 (UTC)
I must have missed this warning, where was it? Should I remove the script from w:en:User:Nemo_bis/common.js? --Nemo 14:54, 20 February 2015 (UTC)
@Nemo bis: The wmflabs version is not abusing any API keys, sorry about the confusion! It is okay to use (although obviously when the production one is up that would be better!- It's not currently puppetised so when labs goes down I have to manually kick it back up.) Mvolz (WMF) (talk) 23:11, 27 February 2015 (UTC)

Reusing this work in the future[edit]

How many wikis added the definitions asked by this page? Are there plans to reuse in Citoid all this work MediaWiki:Visualeditor-cite-tool-definition.json and TemplateData? https://github.com/zotero/translators/blob/master/Wikipedia%20Citation%20Templates.js currently works well enough for me on it.wiki, but most wikis are different. Should/can I submit a patch upstream for that translator to fetch "maps" from each wiki, or are you going to do that, or do you have different plans? --Nemo 14:54, 20 February 2015 (UTC)

Ping. Any idea? If there is no plan to make VisualEditor aware of the meaning of citation templates fields, either by itself or via Citoid/Zotero, is there a plan to make a plan? :) I know Content translation has some sort of map (made manually for some templates on some wikis, I think), it would be nice to join forces. --Nemo 08:39, 3 April 2015 (UTC)
I think pinging Mvolz (WMF) and Jdforrester (WMF) directly may work better. --Elitre (WMF) (talk) 10:40, 3 April 2015 (UTC)
Nemo: Currently only FR and IT have the definitions and the associated template data. We're planning to roll this out to all wikis, just working out the kinks on FR and IT first, they get to be the guinea pigs :). Citoid has its own internal format, called "mediawiki"; it is similar to the Zotero internal format, with some tweaks, to make it suitable for using with TemplateData. You can see comparisons of the the mediawiki format with the other formats here: Citoid/API#Sample_output We are not using the Wikipedia translator you linked to in Zotero because, as you mention, it is hardcoded to work with en wiki. Theoretically using different versions of MediaWiki:Visualeditor-cite-tool-definition.json and TemplateData on each wiki should make it work on any wiki, albeit with varying degrees of success.
Mvolz (WMF), I'm not sure I understand. Where are the maps going to be made? Are the maps going to be usable in Zotero itself? --Nemo 09:40, 7 April 2015 (UTC)

translation[edit]

I couldn't find some part of Citation on translatewiki.net. how can i translate them to Persian (Farsi)? for example: At here Click on یادکرد > click on وب سایت or the rest citation groups. The forms aren't translatedYamaha5 (talk) 04:45, 10 April 2015 (UTC)

@Yamaha5: You can help translate these messages on TranslateWiki.Net – if you don't have an account there, you can sign up for an account (it's not the same system as Wikipedia). Hope this helps. Jdforrester (WMF) (talk) 08:49, 10 April 2015 (UTC)
@Jdforrester (WMF): Thanks here. I couldn't find the texts I mentioned. Yamaha5 (talk) 12:49, 12 April 2015 (UTC)
Like "Formats a citation to a website using the provided information such as URL and title. Used only for sources that are not correctly described by the specific citation templates for books, journals, news sources, etc." which is not at that linkYamaha5 (talk) 12:50, 12 April 2015 (UTC)
@Yamaha5: Aha. Those are the citation templates created by the English Wikipedia community, not the software. Copying and localising those is a huge amount of work – you could start with en:Template:Citation but there are dozens of different components, and it's very complicated, I'm afraid. I believe that some other wikis have copied these templates but I don't know if there is a shared guidance on how to re-use and localise them, sorry. Jdforrester (WMF) (talk) 17:04, 12 April 2015 (UTC)

Template fields won't show up after fulfilling all steps[edit]

I followed all the steps written in this article, and imported all the necessary components, including the CS1 componenet.

Also, I edited the template page and saved it, as per the reported bug in the troubleshooting section. I even added the templatedata lines from the /doc to the main template page to test it, then removed it again.

I also ran the jobqueue to make sure that there are no jobs waiting.

However, all this did not lead to any improvement. When I click on any citation component, I get this message: "The "Template:Cite book" template doesn't yet have a description, but there might be some information on the template's page."

When I try to add a generic field, I get the following error: "lua error in package.lua at line 80: module 'Module:Citation/CS1/Suggestions' not found."

I understand that I don't have suggestion in the /CS1/Suggestion page, but I should not need suggestions anyway if the fields show.

What shall I do to solve this problem? Thanks

I'll try to get you an answer, but on https://www.mediawiki.org/wiki/Topic:Tpaou1ej0s1h6pkl. Thanks. --Elitre (WMF) (talk) 16:17, 27 April 2017 (UTC)


Empty TemplateData[edit]

EDIT: It seems that job tasks were pending even if I was waiting some time, preventing the changes to be applied. If you experience the same problem, manually run the job tasks by executing "php <path_to_wiki>/maintenance/runJobs.php". Notice that making a null edit on each template (e.g. Template:Cite_web) is still required, because of a bug still not fixed (see https://phabricator.wikimedia.org/T52372).




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