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

"Notice: Undefined variable: data" upon enabling of Views module

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.0.7
    • Fix Version/s: 4.1.0
    • Component/s: None
    • Labels:
      None

      Description

      Not too terribly important, but I admit I was a bit disconcerted to see a red error box when enabling the Views module.
      The following message appears once upon enabling the views module:

      Notice: Undefined variable: data in civicrm_views_plugins() (line 6917 of /home/jesse/projects/VEDA/app/veda_install/modules/contrib/civicrm/drupal/modules/views/civicrm.views.inc).

      It looks like if the Calendar module is not enabled, this hook tries to return the $data array that's not defined.

      putting: $data = array(); before the if statement clears up the error. Note this only happens the first time the module is loaded.

      To reproduce, uninstall views, then re-enable it. Here's a drush command sequence to accomplish this:
      drush dis views views_ui --yes; drush pm-uninstall views_ui --yes; drush pm-uninstall views --yes; drush en views views_ui --yes;

        Attachments

          Activity

            People

            • Assignee:
              jalama Jim Taylor
              Reporter:
              jessehs Jesse Hofmann-Smith
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: