vivo-project / VIVO

VIVO is an extensible semantic web application for research discovery and showcasing scholarly work
http://vivoweb.org
BSD 3-Clause "New" or "Revised" License
206 stars 129 forks source link

VIVO-1603: vcard author names with language tags do not work #3193

Closed chenejac closed 5 years ago

chenejac commented 6 years ago

Mike Conlon (Migrated from VIVO-1603) said:

vcards as authors cause an exception to be thrown for any publication containing a vcard author.

The problem appears to be in a listview query related to publications, updated in 1.10 to support precise-subquery.

The bug escaped testing, as the sample data does not contain vcard authors.

 

chenejac commented 6 years ago

tlw72 said:

The template, propStatement-informationResourceInAuthorship.ftl, also needs to be updated at this line:

[https://github.com/vivo-project/VIVO/blob/develop/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-informationResourceInAuthorship.ftl#L22]

It should be changed to:

${statement.authorName!}

This will escape the exception and allow the template to be rendered.

chenejac commented 6 years ago

Mike Conlon said:

Use sample data with vcard authors to test.

chenejac commented 6 years ago

Benjamin Gross said:

The problem appears to be in the concat part of the list view config.

bind (concat(str(?lastName1 + ", "),str(?firstName1 + " "),str(?middleName1)) as ?authorName) .

The solution is to add the comma and space strings via the concat rather than with the + operator.

bind (concat(str(?lastName1),", ",str(?firstName1)," ",str(?middleName1)) as ?authorName) .

vCards as authors DO actually work in 1.10... but if the name has language tags the concat breaks as written.

chenejac commented 6 years ago

tlw72 said:

Good catch, Benjamin.

chenejac commented 6 years ago

Mike Conlon said:

Perfect.  I'll do a pull request tomorrow.  Also unblocks adding vcards to sample-data.n3 and unblocks my sample-data-generator.

I'll include Tim's improvement to the template as well.

chenejac commented 6 years ago

Benjamin Gross said:

Submitted a pull request already, perhaps you can review? :) https://github.com/vivo-project/VIVO/pull/87

chenejac commented 6 years ago

Mike Conlon said:

Yes.  Will review tomorrow.

chenejac commented 6 years ago

Andrew Woods said:

Resolved with: https://github.com/vivo-project/VIVO/commit/3bc86714dd752eff59bd076be3f00283bcf3053b

chenejac commented 3 years ago

This issue is related to #3194