I have a wordpress page with a user-dashboard shortcode embedded in it ([civicrm component="user-dashboard" hijack="0"]
). When logged in, it works fine. When using a private window (and a user id and checksum) I get told I must be logged in to view the page.
I assumed that I had forgotten to set the permission for anonymous users and the user-dashboard, but it seems I have that set correctly:
I assume I'm missing something else obvious, but web searches (including this database) have revealed nothing. I would love an answer or even a suggestion of where to look.
Based on the suggestion below, I've added some debug code to the user-dashboard:
public function __construct() {
parent::__construct();
echo "<!-- " . CRM_Core_Permission::check('access Contact Dashboard') . " -->\n";
if (!CRM_Core_Permission::check('access Contact Dashboard')) {
CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/dashboard', 'reset=1'));
}
$this->_contactId = CRM_Utils_Request::retrieve('id', 'Positive', $this);
$userID = CRM_Core_Session::singleton()->getLoggedInContactID();
echo "<!-- userID:" . $userID . " -->\n";
$userChecksum = $this->getUserChecksum();
echo "<!-- userChecksum:" . $userChecksum . " -->\n";
I was somewhat surprised to see that the checksum and cid aren't making it there:
<!-- 1 -->
<!-- userID: -->
<!-- userChecksum: -->
<div id="crm-container" class="crm-container" lang="en" xml:lang="en">
Now, this is a Wordpress page, not a civiCRM page, but I assumed that since there is a shortcode to add the user-dashboard, that these values would come through as well. Am I deluded in thinking this?
For completeness, here is the (slightly redacted) url: https://mywebsite.com/workshop-registration/?aca11184e16a867aeee5f317ab706f58_1570552008_1440&cid=2
I also tried this one just in case: https://mywebsite.com/workshop-registration/?cs=aca11184e16a867aeee5f317ab706f58_1570552008_1440&cid=2
https://mysite.com/?page=CiviCRM&q=civicrm%2Fevent%2Fregister&reset=1&id=2
points to event page 2 – kapn Oct 9 '19 at 21:09