Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,012
    • Issues 1,012
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • Core
  • Issues
  • #1200

Closed
Open
Created Aug 22, 2019 by haystack@haystack🤔Developer

CiviCRM Dashboard does not respect multiple domains

When I create a new Domain (conveniently done via the API as provided by the org.civicrm.multisite Extension but not limited to that method, the same happens when this is done manually) I have noticed a couple of problems:

  1. When I visit the CiviCRM Dashboard, I see duplicate Dashlets (FYI "Call Next" is mine):

civicrm-duplicate-dashlets

  1. When I try to create a new Dashlet on the new Domain:
$params = array(
  'domain_id' => CRM_Core_Config::domainID(),
  'name' => 'blah',
  'label' => E::ts( 'Blah' ),
  'url' => 'civicrm/blah',
  'fullscreen_url' => 'civicrm/blah?context=dashletFullscreen',
  'permission' => 'access CiviCRM',
  'is_active' => 1,
  'cache_minutes' => 1,
);

// Create dashlet.
$dashlet = civicrm_api3( 'Dashboard', 'create', $params );

What happens with the above code is that the API updates the existing Dashlet with the new domain_id instead of creating a new Dashlet for that Domain.

The result of this is that it's impossible for a Contact to have different Dashlets per Domain.

PR to follow.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
5.18.0
Milestone
5.18.0
Assign milestone
Time tracking
None
Due date
None