Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-18686

Invalid Entity Filter caused by localisation of contact type labels

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Duplicate
    • Affects Version/s: 4.6.16
    • Fix Version/s: 4.7.9
    • Component/s: Core CiviCRM
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      civicrm/CRM/Core/BAO/CustomGroup.php now includes a check:

      if ($entityType != 'Contact' && !in_array($entityType, $contactTypes['values']))

      However, this checks against the labels of contact types, so if you've localised those, say from Organization to Organisation, you can no longer view any Organi[zs]ations!

      I suggest instead the patch should have been:

      if ($entityType != 'Contact' && !array_key_exists($entityType, $contactTypes['values']))

      since then you're comparing the known machine name that no-one should alter.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              artfulrobot.com Rich Lott
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 15 minutes
                15m
                Remaining:
                Remaining Estimate - 15 minutes
                15m
                Logged:
                Time Spent - Not Specified
                Not Specified