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

running managed entites handler , clear cache and rebuild menus when running extension upgraders from UI

    Details

    • Type: Improvement
    • Status: In Quality Assurance
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: Unscheduled
    • Fix Version/s: Unscheduled
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      When running extension upgraders from API using Extension.upgrade end-point ( e.g : drush cvapi Extension.upgrade ) then and before running the upgraders, civicrm will call :

      CRM_Core_Invoke::rebuildMenuAndCaches(TRUE);

      which clear cache, rebuild menus, and most importantly ; it will run managed entity handler which may create,remove , update any managed entity needed .

      The things are different when running upgrader from UI ( from Extension manager page ) where that line of code is not called inside UI upgrader handler code which cause difference when running upgraders from UI vs running them from API if you have an extension that use managed entities .

      Look here to see the difference in code between UI & API :

      So what is required is to update that UI handler code to call : CRM_Core_Invoke::rebuildMenuAndCaches(TRUE); before running upgraders to match what happen at API side .

        Attachments

          Activity

            People

            • Assignee:
              timotten Tim Otten
              Reporter:
              omarabuhussein omar abu hussein
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: