subugoe / goefis

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

Template error #99

Closed njahn82 closed 7 years ago

njahn82 commented 7 years ago

While trying to save a record on pub-dev, I got the following error:

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

Is this the ID of the record?

njahn82 commented 7 years ago

no, the id is 7

christianmahnke commented 7 years ago

Ok, then this is probably the year of publication... We will look into this later.

christianmahnke commented 7 years ago

I'll get this when I try to login to the backend :(

christianmahnke commented 7 years ago

See #176. We will wait until we have a reimport.

njahn82 commented 7 years ago

I am facing this bug here #115

What should I do?

christianmahnke commented 7 years ago

Wir verfolgen das weiter in dem neuen Issue. Derzeit wir geprüft ob dies hilft:

diff --git a/fixes/crossref_mapping.fix b/fixes/crossref_mapping.fix
index 28153b4..32a69a0 100644
--- a/fixes/crossref_mapping.fix
+++ b/fixes/crossref_mapping.fix
@@ -38,7 +38,7 @@ end
 add_field(publication_status, published)

 # type mapping
-if all_match('type','journal-article')
+if all_match('type','journal_article')
     set_field('type','journal_article')
     move_field('container-title.0','publication')
     if any_match(page, '-')
@@ -71,3 +71,6 @@ remove_field(issued)
 remove_field(member)
 remove_field(container-title)
 remove_field(funder)
+if is_number(year)
+  capitalize(year)
+end