diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl
index 91d0e298..5eee6249 100644
--- a/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl
+++ b/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl
@@ -71,12 +71,14 @@
<@p.vitroLinks propertyGroups namespaces editable "individual-urls-people" />
<#--
-
+ <#if hasValidVCard()>
+
+ #if>
-->
diff --git a/productMods/templates/freemarker/body/partials/individual/individual-qrCodeFoafPerson.ftl b/productMods/templates/freemarker/body/partials/individual/individual-qrCodeFoafPerson.ftl
index c5fe1a00..a84023c3 100644
--- a/productMods/templates/freemarker/body/partials/individual/individual-qrCodeFoafPerson.ftl
+++ b/productMods/templates/freemarker/body/partials/individual/individual-qrCodeFoafPerson.ftl
@@ -4,103 +4,120 @@
<#macro qrCodeVCard qrCodeWidth>
- <#local qrCodeUrl = getQrCodeUrlForVCard(qrCodeWidth)>
-
- <#if qrCodeUrl != "">
-
- #if>
+ <#local qrCodeUrl = getQrCodeUrlForVCard(qrCodeWidth)>
+
+ <#if qrCodeUrl != "">
+
+ #if>
#macro>
<#macro qrCodeLink qrCodeWidth>
- <#local qrCodeUrl = getQrCodeUrlForLink(qrCodeWidth)>
-
- <#if qrCodeUrl != "">
-
- #if>
+ <#local qrCodeUrl = getQrCodeUrlForLink(qrCodeWidth)>
+
+ <#if qrCodeUrl != "">
+
+ #if>
#macro>
<#function getQrCodeUrlForVCard qrCodeWidth>
- <#local qrData = individual.qrData >
+ <#local qrData = individual.qrData >
- <#local core = "http://vivoweb.org/ontology/core#">
- <#local foaf = "http://xmlns.com/foaf/0.1/">
- <#local rdfs = "http://www.w3.org/2000/01/rdf-schema#">
+ <#local core = "http://vivoweb.org/ontology/core#">
+ <#local foaf = "http://xmlns.com/foaf/0.1/">
+ <#local rdfs = "http://www.w3.org/2000/01/rdf-schema#">
- <#local firstName = qrData.firstName! >
- <#local lastName = qrData.lastName! >
- <#local org = "" >
- <#local title = qrData.preferredTitle! >
- <#local phoneNumber = qrData.phoneNumber! >
- <#local email = qrData.email! >
- <#local url = qrData.externalUrl! >
- <#local photo = individual.thumbUrl! >
- <#local rev = "" >
+ <#local firstName = qrData.firstName! >
+ <#local lastName = qrData.lastName! >
+ <#local org = "" >
+ <#local title = qrData.preferredTitle! >
+ <#local phoneNumber = qrData.phoneNumber! >
+ <#local email = qrData.email! >
+ <#local url = qrData.externalUrl! >
+ <#local photo = individual.thumbUrl! >
+ <#local rev = "" >
- <#local qrCodeUrl = "">
- <#if firstName != "" && lastName != "">
- <#local vCard><#t>
- BEGIN:VCARD<#lt>
- VERSION:3.0<#lt>
- N:${lastName};${firstName}<#lt>
- FN:${firstName} ${lastName}<#lt>
- <#if org != ""> ORG:${org}#if><#lt>
- <#if title != "">TITLE:${title}#if><#lt>
- <#if phoneNumber != "">TEL;TYPE=WORK,VOICE:${phoneNumber}#if><#lt>
- <#if email != "">EMAIL;TYPE=PREF,INTERNET:${email}#if><#lt>
- <#if url != "">URL:${url}#if><#lt>
- <#if photo != "">PHOTO;VALUE=URL;TYPE=JPG:${photo}#if><#lt>
- <#if rev != "">REV:${rev}#if><#lt>
- END:VCARD<#t>
- #local><#t>
-
- <#local vCard = (removeBlankLines(vCard))?url>
+ <#local qrCodeUrl = "">
+ <#if firstName != "" && lastName != "">
+ <#local vCard><#t>
+ BEGIN:VCARD<#lt>
+ VERSION:3.0<#lt>
+ N:${lastName};${firstName}<#lt>
+ FN:${firstName} ${lastName}<#lt>
+ <#if org != ""> ORG:${org}#if><#lt>
+ <#if title != "">TITLE:${title}#if><#lt>
+ <#if phoneNumber != "">TEL;TYPE=WORK,VOICE:${phoneNumber}#if><#lt>
+ <#if email != "">EMAIL;TYPE=PREF,INTERNET:${email}#if><#lt>
+ <#if url != "">URL:${url}#if><#lt>
+ <#if photo != "">PHOTO;VALUE=URL;TYPE=JPG:${photo}#if><#lt>
+ <#if rev != "">REV:${rev}#if><#lt>
+ END:VCARD<#t>
+ #local><#t>
- <#local qrCodeUrl = "https://chart.googleapis.com/chart?cht=qr&chs=${qrCodeWidth}x${qrCodeWidth}&chl=${vCard}&choe=UTF-8" >
- #if>
-
- <#return qrCodeUrl>
+ <#local vCard = (removeBlankLines(vCard))?url>
+
+ <#local qrCodeUrl = "https://chart.googleapis.com/chart?cht=qr&chs=${qrCodeWidth}x${qrCodeWidth}&chl=${vCard}&choe=UTF-8" >
+ #if>
+
+ <#return qrCodeUrl>
#function>
<#function getQrCodeUrlForLink qrCodeWidth>
- <#local qrData = individual.qrData >
+ <#local qrData = individual.qrData >
- <#local url = qrData.externalUrl! >
+ <#local url = qrData.externalUrl! >
- <#local qrCodeUrl = "">
- <#if url != "">
- <#local qrCodeContent = url?url>
- <#local qrCodeUrl = "https://chart.googleapis.com/chart?cht=qr&chs=${qrCodeWidth}x${qrCodeWidth}&chl=${qrCodeContent}&choe=UTF-8" >
- #if>
-
- <#return qrCodeUrl>
+ <#local qrCodeUrl = "">
+ <#if url != "">
+ <#local qrCodeContent = url?url>
+ <#local qrCodeUrl = "https://chart.googleapis.com/chart?cht=qr&chs=${qrCodeWidth}x${qrCodeWidth}&chl=${qrCodeContent}&choe=UTF-8" >
+ #if>
+
+ <#return qrCodeUrl>
#function>
<#function removeBlankLines input>
- <#local test = "\n\n">
- <#local replacement = "\n">
+ <#local test = "\n\n">
+ <#local replacement = "\n">
- <#local output = input>
-
- <#local maxLoop = 50>
- <#list 1..maxLoop as i>
- <#if output?contains(test)>
- <#local output = output?replace(test, replacement)>
- <#else>
- <#break>
- #if>
- #list>
+ <#local output = input>
- <#return output>
+ <#local maxLoop = 50>
+ <#list 1..maxLoop as i>
+ <#if output?contains(test)>
+ <#local output = output?replace(test, replacement)>
+ <#else>
+ <#break>
+ #if>
+ #list>
+
+ <#return output>
+#function>
+
+<#function hasValidVCard>
+
+ <#local qrData = individual.qrData >
+
+ <#local firstName = qrData.firstName! >
+ <#local lastName = qrData.lastName! >
+
+ <#local validVCard = false>
+ <#if firstName != "" && lastName != "">
+ <#local validVCard = true>
+ #if>
+
+ <#return validVCard>
#function>
+
+