Details
-
Type: Sub-task
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.4.0, 4.0.0, 4.1.0, Unscheduled
-
Fix Version/s: 4.1.0
-
Component/s: CiviReport
-
Labels:None
Description
Allow templates/CRM/Contact/Form/ActionsButton.tpl to tolerate an unassigned userRecordUrl variable.
In the only source file where this variable is assigned, it is assigned unconditionally. Apparently this template also gets called from code-paths that don't invoke the assignment code.
diff --git templates/CRM/Contact/Form/ActionsButton.tpl templates/CRM/Contact/Form/ActionsButton.tpl
index c847b66..4b9a0e7 100644
— templates/CRM/Contact/Form/ActionsButton.tpl
+++ templates/CRM/Contact/Form/ActionsButton.tpl
@@ -51,7 +51,7 @@
</a>
</li>
- {if $userRecordUrl }
+
{if !empty($userRecordUrl) }<li class="crm-contact-user-record">
{ts}User Record{/ts}">
<a href="{$userRecordUrl}" class="user-record " title="
<span><div class="icon user-record-icon"></div>{ts}User Record
{/ts}</span>