In working on the D7 port of the Userpoints module (which has Views 7.x-3.x-dev integration), we noticed the following error message when trying to add Userpoints-related fields to views:

PHP Fatal error: Call to undefined function vpr() in /Users/benkaplan/git/drupal/sites/all/modules/views/handlers/views_handler_field.inc on line 99

Is vpr() an internal views debug function that was removed, but the call has forgotten to be removed?

If that line is commented out, then everything seems to work OK.

Thanks,
Ben

CommentFileSizeAuthor
#1 vpr.patch1.08 KBbojanz

Comments

bojanz’s picture

Status: Active » Needs review
StatusFileSize
new1.08 KB

This should do it.

Grepped the source, that was the only vpr() call left.
Saw vsm() used in the same context (in views.module, line 855), hence the patch.

dawehner’s picture

Status: Needs review » Fixed

Sorry this is wrong.

This is the old d6 code:

/**
 * Provide debug output for Views. This relies on devel.module
 */
function views_debug($message) {
  if (module_exists('devel') && variable_get('views_devel_output', FALSE) && user_access('access devel information')) {
    if (is_string($message)) {
      $output = $message;
    }
    else {
      $output = var_export($message, TRUE);
    }
    if (variable_get('views_devel_region', 'footer') != 'watchdog') {
      drupal_set_content(variable_get('views_devel_region', 'footer'), '<pre>' . $output . '</pre>');
    }
    else {
      watchdog('views_logging', '<pre>' . $output . '</pre>');
    }
  }
}

/**
 * Shortcut to views_debug()
 */
function vpr($message) {
  views_debug($message);
}

So what should be used here is "debug()"

I did this and commited it

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.