I tried the "comm__namedPage" approach shown in the question with names of:
- cvcp__event-details
- c__event-details
- event-details
and none of those worked.
What did work, and with the benefit of being able to inject query parameters (that I would have preferred to use "state" for but the API does not allow that) was:
Map<String, Object> pageRef = new Map<String, Object>{
'type' => 'standard__webPage',
'attributes' => new Map<String, Object> {
'url' => '/portal/s/event-details?eventId=a0756000005VLI3AAO'
}
};
notification.setTargetPageRef(JSON.serialize(pageRef));
So I will be using his approach for now. (The CSP console log error shown in the question is still output but the navigation works.)