1

The list of campaign pages under 'create a personal campaign page for another page' list is a little wonky. IT has three basic columns 1. Name of page with hyperlink 2. End date or 'ongoing' 3. Create a PCP hyperlink.

The hyperlink in the first column is incorrect - I checked the demo site, it is wrong there as well. I tracked it down as far as the template Contribution>Page>PcpUserDashboard

In that file (line 80 in 4.6.4) it lists

{if $row.component eq 'contribute'}
<a href="{crmURL p='civicrm/contribute/transact' q="id=`$row.pageId`&reset=1"}" 

{else}
<a href="{crmURL p='civicrm/event/register' q="id=`$row.pageId`&reset=1"}

{/if}

Every link listed is the 'else' option (a event link) even when it's a contribution page. I'm not sure what part of the if statement is going wrong. I tried a few variations in this template to no avail. I also tried poking through the php but was unable to figure it out.

1

You may want to try using Smarty debugging.

  • Turn on debugging at Administer menu > System Settings > Debugging and Error Handling.
  • Load the same URL, but add "&SmartyDebug=1" to the end.
  • You may need to enable pop-ups in your browser to see the window that appears.

Hopefully access to the Smarty debugging will make it clear what the value of $row.component is.

Alternatively, you could just add "$row.component" to the template inside the "if" statement. I'd guess it's not showing either "event" or "contribute", but something else altogether.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.