[RESOLVED] https://commons.wikimedia.org/wiki/Commons_talk:TemplateData#How_to_get_Temp...
On Sat, Sep 14, 2013 at 5:54 AM, dan entous dan.entous.wikimedia@gmail.com wrote:
what needs to be set-up in a local wiki to get the {{TemplateBox}} to properly generate a “Template data” section?
- install and activate extension/TemplateData
- make sure the following modules are installed a. Module:Date b. Module:JSON c. Module:Languages d. Module:TemplateBox
- ???
i now understand that the “Template data” section on a Template page can be generated using either a {{TemplateBox}} section or a <templatedata></templatedata> section, however, if i try to copy the source of https://commons.wikimedia.org/wiki/Template:Artwork/doc and save it in my local wiki it does not work. i get “Syntax error in JSON”. i can use the Special:Export and Special:Import pages to create that doc page, but then the “Template data” section of the page still says “Syntax error in JSON”.
even using a simple {{TemplateBox}} example does not work locally, using Special:ExpandTemplates, whereas it does work on commons.
{{TemplateBox | useTemplateData=1 | 1 = author | 1aliases = Author | 1d = For some objects "author" is more appropriate term than "artist". In most cases either "author" or "artist" should be used, not both. | 1def = | 1stat = optional | 1d-td-en = For some objects "author" is more appropriate term than "artist". In most cases either "author" or "artist" should be used, not both. | 1label-en = Author | 1type = string }}
On Fri, Sep 13, 2013 at 5:09 PM, dan entous dan.entous.wikimedia@gmail.com wrote:
i'm trying to set-up TemplateData in a local wiki using the https://commons.wikimedia.org/wiki/Template:Artwork/doc from commons. i have imported the template using Special:Export and Special:Import, however, the page gives a Syntax error in JSON message without any further info on what may be wrong.
a test template in the local wiki with a <templatedata> section works without issue.
i've looked in the Template:Artwork/doc and see no <templatedata> section. on commons it works, but in my local wiki it does not. any ideas on what set-up i may be missing?
tia, dan