CRM-15132 Drupal-code being called from CiviCRM

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.6
    • Fix Version/s: 4.7
    • Component/s: None
    • Labels:
    • Documentation Required?:
      None

      Description

      On ~line 622 of CRM/Core/BAO/Navigation.php, something that looks like:

      ($config->userSystem->is_drupal) &&
      ((module_exists('toolbar') && user_access('access toolbar')) ||
      module_exists('admin_menu') && user_access('access administration menu')
      )

      This is obviously bad for lots of reasons. CiviCRM should basically never call into Drupal. In my case, it's attempting to call functions that no longer exist in Drupal 8.

        Attachments

          Activity

          [CRM-15132] Drupal-code being called from CiviCRM
          Coleman Watts added a comment -

          Simplest solution would be to take out the offending function calls and simplify the conditional to just
          if ($config->userSystem->is_drupal) {

          Torrance added a comment -

          I just spent over an hour debugging this issue again for Drupal 8.

          See attached patch: I've stripped out all customisation and simply used the text 'Hide mnu'. IMO, the less probing civicrm does of the CMS, the better the separation of concerns and the happier everyone will be.

          Coleman Watts added a comment -

          Agreed. Want to submit a PR for this?

            People

            • Assignee:
              Coleman Watts
              Reporter:
              Torrance

              Dates

              • Created:
                Updated:
                Resolved: