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

Deleting file / attachment causes Undefined index: tag_id in CRM_Core_BAO_EntityTag::del()

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.12, 4.7.1
    • Fix Version/s: 4.7.8
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Core Team Funds

      Description

      Steps to reproduce:

      1. Create a Custom data set with a file field
      2. Add custom data to a contact (or other entity) with attached file
      3. Delete file

      File is deleted as expected, however leaves a notice in the log such as:

      Notice: Undefined index: tag_id in CRM_Core_BAO_EntityTag::del() (line 120 of /home/civicrm-dev/public_html/sites/all/modules/civicrm/CRM/Core/BAO/EntityTag.php).

      On investigation this appears to be a protocol issue between CRM_Core_BAO_File::deleteEntityFile which does not provide a tag_id and CRM_Core_BAO_EntityTag::del which assumes one is available for its post hook.

      Not sure which function is wrong.

        Attachments

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              agileware Agileware
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h