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

uf_group.name may not be a unique value for CiviCRM installs that started prior to 4.2

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 4.4.11, 4.5.7, 4.6
    • Fix Version/s: None
    • Component/s: CiviCRM Profile
    • Labels:
    • Documentation Required?:
      None

      Description

      When we upgraded to 4.4.11 we ran into problems created by CRM-15330 .

      Looking at our uf_group table it seems that in 4.1 (and possibly versions prior to that) when a profile was copied the name was copied also. So it is possible for sites that operated on 4.1 to have more than one profile with the same name even though the title for each profile must be unique.

      This hasn't mattered until now because it seems that profiles have always been called/referenced by title or id which are unique.

      However this has changed with CRM-15330 and has lead to CRM-15952.

      Whilst CRM-15952 might fix the problem created by CRM-15330, I think that having non-unique profile names is a bad idea, and that "something" should be done about them.

      Would it be possible to include code in the upgrade script for 4.6 that converts non-unique values in uf_ group.name to unique values by appending _XX where XX is the uf_group.id to those values? This is what has been done since 4.2, but name values from prior to 4.2 were not updated.

      Would an automatic change of values in uf_ group.name be likely to break custom code?

      If so, would a better idea be for the upgrader to alert people if they have non-unique values in that field and leave them to alter the values and fix custom code that might break.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jchester Joanne Chester
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: