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

Long group name titles result in same database name

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.0.5
    • Fix Version/s: 4.1.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      This bug were also discussed in the forum (http://forum.civicrm.org/index.php/topic,21807.0)

      We use 31 characters for the database name but titles can be 64 characters. The name are truncated if the title is too long. That means that you cannot create two groups where the 31 first characters are the same because then the database name will be the same and thats not allowed (names are unique).

      The fix is to add the database id as suffix to the name, like this: <name><id>. The id is generated by the database upon creation and therefore we don't have the id until after the group is created. In order to solve this problem also for the existing installations we add a _tmp suffix before creation and than change the name to the final result <name><id>

      This patch also includes this related code change:

      • No need for LIKE search when checking if group already exists, using '=' operator instead

        Attachments

        1. Edit.php.patch
          0.7 kB
          Jonas Tano
        2. Group.php.patch
          0.7 kB
          Jonas Tano

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              gastrit Jonas Tano
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: