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

CiviCRM resolves all tokens including groups & tags if none are present in the mail text

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.8
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      We have been having serious performance issues in 4.6 with smart groups on one customer since upgrading from 4.4. This customer has a large number of groups & group memberships.

      One area which is problematic is resolving tokens when sending messages. If no tokens are in use in the message template it defaults to 'get me all' rather than 'get me none'. The result is that groups & tags are resolved unecessarily. Groups & tags are not offered as tokens so at this stage I propose to remove them from the return properties in CRM_Utils_Token. However, I also think that the call to getContactDetails in sendTemplate could be skipped entirely if there are not actually any tokens. This makes more sense in master than in 4.6 (my current focus) because I don't know if hooks will interact with the resolved details.

      I will add code comments where I think further change needs to be made

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: