profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/datango/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

datango/LibreCat 0

A publication management system

issue commentLibreCat/LibreCat

repeatable form fields generate empty element, even when not wanted

For this purpose we have the fix clean_preselects(), which removes the abstract field if it detects that there is no content in the text field, but only the preselected language field - which means that there is no abstract.
The same goes for related_material.link. It's a combined field of a relation and a url and the relation is always preselected. The fix removes it if there is not also content in the url field when the record is submitted.

For all other repeatable fields we have the vacuum() fix, which removes empty arrays, empty hashes and empty strings before saving/returning the record.

How exactly would you separate the add button from the input field? And what would change in the form data when doing this?

nicolasfranck

comment created time in 11 days

issue openedLibreCat/LibreCat

repeatable form fields generate empty element, even when not wanted

Repeated form fields (especially the complex ones) like abstract generate useless array entries in the record.

The reason for this that always one element for input (e.g. combination of "language" and "text") is shown.

This way unwanted empty values slip in, and one cannot distinguish anymore between wanted and unwanted empty values..

Why no separate the "add" button from the input element, and leave the "remove" element with the element?

Now you have

<input> - +

created time in 14 days

pull request commentLibreCat/LibreCat

Typo in arXiv mapping fix

Coverage Status

Coverage remained the same at 81.384% when pulling 59c9eaf71e25b9bedbb31f0cc92fe169ef8a4e8d on pr/typo_in_arxiv_mapping_fix into ec3e4ebb15a8da54834fff2cf994b244d878142e on dev.

petrakohorst

comment created time in 21 days

PR opened LibreCat/LibreCat

Typo in arXiv mapping fix

Arxiv ID missing in arXiv imports.

Should be r.external_id.arxiv instead of external_id.arxiv

+1 -1

0 comment

1 changed file

pr created time in 21 days

create barnchLibreCat/LibreCat

branch : pr/typo_in_arxiv_mapping_fix

created branch time in 21 days

delete branch LibreCat/LibreCat

delete branch : pr/typo_in_arxiv_mapping_fix

delete time in 21 days

create barnchLibreCat/LibreCat

branch : pr/typo_in_arxiv_mapping_fix

created branch time in 21 days

push eventLibreCat/LibreCat

Petra Kohorst

commit sha b614519ef9e05e5979f584b9577b5feb60dbf85e

Additional fix in fix file, regarding titles that arrive as arrays and fail validation.

view details

push time in 21 days

PR opened LibreCat/LibreCat

New and improved crossref DOI import.

Due to the crossref DOI import getting slower and slower, this PR introduces a new import using a different crossref API.

Crossref has changed their APIs to be faster and more reliable if services using the APIs identify themselves correctly, so they can be contacted in case of any problems resulting from their use of the API. Anyone refusing to identify themselves (as we have been doing - unknowingly) will only have access to a slow and often overloaded server pool running the APIs.

The new crossref import for LibreCat not only implements (at least the most basic) identification via an email address - and thus is waaay faster -, but also switches from REST to XML API, which provides far better and more detailed metadata for each record.

Important notes:

  1. Make sure to set a real, working and somehow identifying email address in catmandu.local.yml -> admin_email. You should be reachable there, it's only fair.
  2. The fixes/lookup/cr_type_mapping.fix is kind of a wild guess on my account. I have not been able to find a reliable list of publication types in use at crossref so far. This mapping, however, works for the types coming into LibreCat from crossref.
  3. The method of first determining the agency (crossref or datacite) for a DOI and then requesting the metadata is no longer usable. The API used for the agency check is the same slow REST API we have been using all along and it will basically kill a request through timeout before it has even happened. The new way to identify the agency is to request a DOI from crossref directly. The resulting XML (there will always be one) will either contain status="resolved" or status="unresolved". In the latter case we then request the DOI from datacite
  4. There was quite some pushing and shoving involved in getting the XML into hash format and into the fixer. Crossref has some (to me) strange xml tags in there that needed to be replaced in order to be read correctly. These changes are done by regex in the fetch sub in lib/LibreCat/FetchRecord/crossref.pm. Any suggestions for a better/nicer/faster/more beautiful way of dealing with this XML are welcome!
+386 -120

0 comment

4 changed files

pr created time in 24 days

create barnchLibreCat/LibreCat

branch : pr/new_crossref_doi_import

created branch time in 24 days

push eventLibreCat/LibreCat

Patrick Hochstenbach

commit sha ec3e4ebb15a8da54834fff2cf994b244d878142e

Updating documentation Removing commands that are not implemented.

view details

push time in 2 months

issue openedLibreCat/LibreCat

Add support in the index command to reindex one model

E.g. we got a request to reindex the user model (for some internal reason).

created time in 2 months

GollumEvent
GollumEvent
GollumEvent
GollumEvent

pull request commentLibreCat/LibreCat

Minor fix in error message.

Coverage Status

Coverage remained the same at 81.384% when pulling f73e4811682b9aac4d3d131a7a606b74226525f5 on pr/error_message_correction into f39acd2cd5c04e9a5a538d0ead43dfd4ae85f4ba on dev.

petrakohorst

comment created time in 2 months

PR opened LibreCat/LibreCat

Minor fix in error message.

Just a correction of an error message.

+1 -1

0 comment

1 changed file

pr created time in 2 months

create barnchLibreCat/LibreCat

branch : pr/error_message_correction

created branch time in 2 months

GollumEvent
GollumEvent
GollumEvent
GollumEvent
GollumEvent

issue commentLibreCat/LibreCat

session cookie set twice

And I just found out that the single-sign-on modules (Plack::Auth::SSO::*) don't work well if your session cookie has setting SameSite: Strict:

  • access /auth/orcid
  • /auth/orcid adds csrf_token (for cross site request forgery) to your session, and redirect to orcid
  • orcid redirects back to /auth/orcid, but .. without a cookie, so it thinks that this is a CSRF attack

Reason: combination redirect + samesite:Strict does not work..

nicolasfranck

comment created time in 3 months

GollumEvent
GollumEvent
GollumEvent