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