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

Notice: "Undefined contstant id" upon enabling of Views (Drupal 7 Views 3).

    Details

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

      Description

      Here's the error message received upon visiting the /admin/structure/views page for the first time:

      Notice: Use of undefined constant id - assumed 'id' in civicrm_views_data() (line 4861 of /home/jesse/projects/VEDA/app/veda_install/modules/contrib/civicrm/drupal/modules/views/civicrm.views.inc).
      Notice: Use of undefined constant id - assumed 'id' in civicrm_views_data() (line 4940 of /home/jesse/projects/VEDA/app/veda_install/modules/contrib/civicrm/drupal/modules/views/civicrm.views.inc).

      It looks like the quotes are missing around 'id' in the array (on the lines mentioned in the error message), so PHP is looking for a constant defined as "id".

      To reproduce, uninstall views, install it, then visit the page at /admin/structure/views.

      Here is the drush commands to do this (saves some time over the GUI):
      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: