Page MenuHomePhabricator

Incorrect itemType causing missing parameter in citation
Closed, ResolvedPublic0 Story Points


At I tested Citoid and gave it the link to a user sandbox.
I get a "{{Article}} : paramètre « périodique » manquant" error. When I click on Modifier, I'd expect the field for the required parameter to show up immediately in the inspector, rather than having to look for it.
If I try this on test2 (same URL) I don't get the same error, so it must be related to TemplateData.

This is due to the fact that these url is coming back as itemType blogPost, but being cast to Article, which does not have a way to translate the field "blogTitle" to "periodique". This is a very general problem having to do with the way we translate between our types and templateData types, and unfortunately is not easily resolvable without creating new templates for those types or adding expanding the way templateData works.

Event Timeline

Elitre created this task.Mar 20 2015, 2:19 PM
Elitre raised the priority of this task from to Needs Triage.
Elitre updated the task description. (Show Details)
Elitre added projects: Citoid, TemplateData.
Elitre added a subscriber: Elitre.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 20 2015, 2:19 PM

Okay, what's going on here is a mismatch between the "Article" type and the "encyclopediaArticle" type.

For most of the "Article" types, the "periodique" value should be the same as publicationTitle. Unfortunately in the encyclopediaArticle type, this field is called encyclopediaTitle. So there is no publicationTitle for encyclopediaArticle, only encyclopediaTitle, and the parameter comes up missing.

This is one of those inherent problems with trying to match zotero types and template data to existing template types and template fields.

On fr wiki, is there an encycolpedia Article template like there is on en wiki? The best solution would probably be to add a template specifically for encyclopedia articles in the Mediawiki: defintion, and then give it the correct template data. Then we'll be able to represent this without doing anything on the backend. That is, in the event that all encyclopedia Articles have this field instead of publication title (not actually sure about this, see below)

The only other option would be for the backend to either a) coerce encyclopediaArticle types into some other type (BAD idea, I think) OR add a publicationTitle field that just has the same value as encyclopediaTitle and leave both fields in. Which is sad and messy, but the most forwards compatible. OR we can convert all encyclopediaTitles into publicationTitle field.

The weird thing about this is that lists both publicationTitle and encyclopediaTitle as valid fields with pub title in parens. My experience thus far with Zotero is actually these types come back with publicationTitle, not the type specific title. So I'm not entirely sure this is even consistent between translators. I'll ask Zotero folks and report back.

@Jdforrester-WMF, thoughts?

Mvolz added a comment.Mar 21 2015, 9:42 PM

So on the listserve I discovered that it turns out I was under a terrible, terrible misapprehension that Zotero uses base types instead of item specific types. This is not the case.

What this means @Jdforrester-WMF is that I need the change the data model for type "webpage" and convert publicationTitle to websiteTitle ASAP.

We will have to update all existing cite web template data in all languages.

For any types that have specific types, as opposed to the base type publicationTitle, it would be best if we could give them their own citation template. I know that en wiki can support many of these types in their definitions (like cite encyclopaedia).

I can temporarily put both fields in the response in citoid to facilitate a smooth transition. Please don't add any more template data to wikis though until this is deployed though :(.

This will also break all existing wikitext gadgets once we remove the duplicate field (I know there's at least one, although not sure if it's in use)

Mvolz moved this task from Backlog to IO Tasks on the Citoid board.Mar 22 2015, 11:18 AM
Mvolz changed the task status from Open to Stalled.Apr 3 2015, 2:47 PM
Mvolz updated the task description. (Show Details)
Mvolz set Security to None.
Mvolz updated the task description. (Show Details)Apr 3 2015, 2:52 PM

Hey, did this get done?

Jdforrester-WMF triaged this task as High priority.Sep 17 2015, 6:33 PM
Mvolz added a comment.Sep 17 2015, 8:10 PM

@Jdforrester-WMF I don't think we settled on a solution?

The low hanging fruit way to resolve this is with templates; fr wiki needs a separate template for blogPost that translates the parameter properly. So one could copy the newspaperArticle template exactly, but then in the templateData use the correct parameter for the publicationTitle. Then change the mediawiki message to do blogPost : blogPost.

The other alternative involves changing how we do templatedata to allow multiple optional parameter names in the citation. I haven't properly thought through how to do that.

Mvolz added a comment.Sep 17 2015, 8:12 PM

Of note, @Elitre recently forwarded me a community complaint about this same issue, and I suggested the same solution (copy the template and fix the templateData).

Krenair moved this task from Backlog to External on the TemplateData board.Jan 12 2016, 11:58 PM
The_RedBurn renamed this task from Missing parameter in citation to Incorrect itemType causing missing parameter in citation.Aug 17 2016, 1:54 PM

Why is the og:site_name property reserved to pages recognized as "webpage"?
Couldn't it be tried on pages recognized as "blogPost", "videoRecording", "film" and maybe others?
Since this is stalled, it would fix websites such as, and

Something that I don't understand is that
,while recognized as blogPost, gets its "og:site_name" property correctly extracted (Citoid)
but doesn't (Citoid).

Restricted Application added a project: VisualEditor. · View Herald TranscriptSep 16 2016, 9:52 AM
Mvolz closed this task as Resolved.Oct 28 2016, 6:01 PM
Jdforrester-WMF set the point value for this task to 0.
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptMay 1 2017, 4:23 PM