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

CiviEvent 3.4.5 copying an event does not purge permissions cache

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.4.8
    • Fix Version/s: 4.2.0
    • Component/s: CiviEvent
    • Labels:
      None

      Description

      Bug is fully described in summary, but specifically this manifests when memcache is in use (with 3.4.5, but I suspect 3.4.8 will be the same).

      To reproduce:

      1) create an event
      2) create a copy of that event
      3) be treated to "Sorry. A non-recoverable error has occurred. You do not have permission to access this page."
      4) restart memcached
      5) reload the edit-new-event page and find it works

      Dirty hack patch below which resolves this. Probably requires something more targeted for cache-clearing?

      diff --git a/htdocs/sites/all/modules/civicrm/CRM/Event/BAO/Event.php b/htdocs/s
      index 0accea4..e57adcc 100644
      — a/htdocs/sites/all/modules/civicrm/CRM/Event/BAO/Event.php
      +++ b/htdocs/sites/all/modules/civicrm/CRM/Event/BAO/Event.php
      @@ -940,6 +940,7 @@ WHERE civicrm_event.is_active = 1
      }
      }
      $copyEvent->save( );
      + CRM_Utils_System::flushCache( );

      require_once 'CRM/Utils/Hook.php';
      CRM_Utils_Hook::copy( 'Event', $copyEvent );

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              maznu Marek Isalski
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 15 minutes
                15m
                Remaining:
                Remaining Estimate - 15 minutes
                15m
                Logged:
                Time Spent - Not Specified
                Not Specified