subugoe / goefis

This repository contains the layers and changes specific to the SUB Goettingen
2 stars 0 forks source link

Templating error after Crossref import #115

Closed njahn82 closed 7 years ago

njahn82 commented 7 years ago

Get

{
   "error" : "core - template - date error - bad time/date string:  expects 'h:m:s d:m:y'  got: '2.017' at /srv/LibreCat/local/lib/perl5/Dancer/Template/Abstract.pm line 91.\n",
   "exception" : "Core::Template"
}

when trying to access http://localhost:5001/librecat?

I imported a yaml with

$ bin/librecat publication add /tmp/data

I got the file via the CLI Crossref import:

bin/librecat publication fetch crossref 10.1371/journal.pone.0169754 > /tmp/data

Here's the YAML

---
author:
- ORCID: http://orcid.org/0000-0001-5595-4758
  first_name: Peter
  last_name: Rubbens
- ORCID: http://orcid.org/0000-0003-4996-2596
  first_name: Ruben
  last_name: Props
- first_name: Nico
  last_name: Boon
- first_name: Willem
  last_name: Waegeman
cited-count: 0
citing-count: 49
content-domain:
  crossmark-restriction: !!perl/scalar:JSON::PP::Boolean 0
  domain:
  - www.plosone.org
created:
  date-parts:
  - - 1
    - 25
  date-time: 2017-01-25T18:57:32Z
  timestamp: 1485370652000
doi: 10.1371/journal.pone.0169754
editor:
- affiliation: []
  family: Larsen
  given: Peter E.
issn-type:
- type: electronic
  value: 1932-6203
issue: '1'
license:
- URL: http://creativecommons.org/licenses/by/4.0/
  content-version: vor
  delay-in-days: 0
  start:
    date-parts:
    - - 2017
      - 1
      - 25
    date-time: 2017-01-25T00:00:00Z
    timestamp: 1485302400000
original-title: []
page: e0169754
publication_identifier:
  issn:
  - 1932-6203
publication_status: published
published-online:
  date-parts:
  - - 2017
    - 1
    - 25
publisher: Public Library of Science (PLoS)
reference-count: 49
short-container-title:
- PLoS ONE
short-title: []
status: new
subject:
- Biochemistry, Genetics and Molecular Biology(all)
- Agricultural and Biological Sciences(all)
- Medicine(all)
title: Flow Cytometric Single-Cell Identification of Populations in Synthetic Bacterial
  Communities
type: journal_article
update-policy: http://dx.doi.org/10.1371/journal.pone.corrections_policy
volume: '12'
year: 2017
...
phochste commented 7 years ago

This is not a fix error. In the template toolkit an magic date-time plugin was used that tried to interpret everything on the page as a number. This plugin was of no use and is deleted from the dev branch

njahn82 commented 7 years ago

Alright, thank you for the update!

On 16 March 2017 at 08:30, Patrick Hochstenbach notifications@github.com wrote:

This is not a fix error. In the template toolkit an magic date-time plugin was used that tried to interpret everything on the page as a number. This plugin was of no use and is deleted from the dev branch

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/subugoe/goefis/issues/115#issuecomment-286978980, or mute the thread https://github.com/notifications/unsubscribe-auth/ABn8RmadhwPRyBNeBKdfV0RyNgQo9Mb8ks5rmOUigaJpZM4MbHKD .

christianmahnke commented 7 years ago

This is related: https://github.com/LibreCat/LibreCat/issues/247 This is one of the causes: https://github.com/LibreCat/LibreCat/issues/249