glossarist / iev-demo-site

Glossarist IEV demo site
https://iev-staging.geolexica.org
0 stars 0 forks source link

Some concept machine-readable representations are broken due to termlinks #54

Closed skalee closed 4 years ago

skalee commented 4 years ago

JSON and YAML representations of multiple concepts are broken broken. Probably every concept which has a termlink somewhere in its source file is affected. Deployed site is not affected though — perhaps it is some bug recently introduced in one of the dependencies.


For example, concept 192-12-03 (reliability growth) is affected.

Source YAML (languages other than English have been omitted):

---
termid: 1921203
term: reliability growth
eng:
  id: 1921203
  terms:
  - type: expression
    normative_status: preferred
    usage_info: of an item
    designation: reliability growth
  definition: iterative process for reliability improvement by addressing design and
    manufacturing weaknesses
  language_code: eng
  notes:
  - See also reliability growth testing ({{192-12-06, IEV:192-12-06}}).
  examples: []
  entry_status: Standard
  date_accepted: '2015-02-01T00:00:00+00:00'
  date_amended: '2015-02-01T00:00:00+00:00'
  review_date: '2015-02-01T00:00:00+00:00'
  review_decision_date: '2015-02-01T00:00:00+00:00'
  review_decision_event: published

Generated YAML representation (/api/concepts/192-12-03.yaml), note that termlink is missing in notes entry:

---
term: reliability growth
termid: 192-12-03
eng:
  id: 192-12-03
  terms:
  - type: expression
    normative_status: preferred
    usage_info: of an item
    designation: reliability growth
  definition: iterative process for reliability improvement by addressing design and
    manufacturing weaknesses
  language_code: eng
  notes:
  - See also reliability growth testing ().
  examples: []
  entry_status: Standard
  date_accepted: '2015-02-01T00:00:00+00:00'
  date_amended: '2015-02-01T00:00:00+00:00'
  review_date: '2015-02-01T00:00:00+00:00'
  review_decision_date: '2015-02-01T00:00:00+00:00'
  review_decision_event: published

Generated JSON representation (/api/concepts/192-12-03.json), note similar issue:

{
  "term": "reliability growth",
  "termid": "192-12-03",
  "eng": {
    "id": "192-12-03",
    "terms": [
      {
        "type": "expression",
        "normative_status": "preferred",
        "usage_info": "of an item",
        "designation": "reliability growth"
      }
    ],
    "definition": "iterative process for reliability improvement by addressing design and manufacturing weaknesses",
    "language_code": "eng",
    "notes": [
      "See also reliability growth testing ()."
    ],
    "examples": [

    ],
    "entry_status": "Standard",
    "date_accepted": "2015-02-01T00:00:00+00:00",
    "date_amended": "2015-02-01T00:00:00+00:00",
    "review_date": "2015-02-01T00:00:00+00:00",
    "review_decision_date": "2015-02-01T00:00:00+00:00",
    "review_decision_event": "published"
  }
}

Among others, following warning are printed:

Liquid Warning: Liquid syntax error (line 1): Expected end_of_string but found number in "{{192-12-06, IEV:192-12-06}}" in concepts/192-12-03.json
Liquid Warning: Liquid syntax error (line 36): Expected end_of_string but found number in "{{192-12-06, IEV:192-12-06}}" in concepts/192-12-03.yaml

YAML and JSON output does not use templates. We disable Liquid processing for these formats by setting liquid to false in a front matter. This is a feature introduced in Jekyll 4 AFAIR, and it was working before, but apparently has stopped to.

skalee commented 4 years ago

Caused by bug which is fixed in https://github.com/geolexica/geolexica-server/pull/128.