CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • turning off mailto in a views civicrm field causes Fatal Error
Pages: [1]

Author Topic: turning off mailto in a views civicrm field causes Fatal Error  (Read 1320 times)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
turning off mailto in a views civicrm field causes Fatal Error
October 23, 2009, 05:04:59 pm
I guess what the problem is that what should happen when we select the 'no link' isn't properly defined in the below - Fatal Error is

Fatal error: Call to undefined method civicrm_handler_field_email::render_link() in /home/www-home/wwoof/drupal-6.13/sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm_handler_field_email.inc on line 38

 - anyone able to conjure up correct php?
Quote
 function options_form(&$form, &$form_state) {
    parent::options_form($form, $form_state);
    $form['link_to_user'] = array(
      '#title' => t('Link this field'),
      '#type' => 'radios',
      '#options' => array(
        0 => t('No link'),
        'mailto' => t("With a mailto:"),
      ),
      '#default_value' => $this->options['link_to_user'],
    );
  }

  function render($values) {
    if ($this->options['link_to_user'] == 'mailto') {
      return l($values->{$this->field_alias}, "mailto:" . $values->{$this->field_alias});
    }
LINE 38    return $this->render_link(check_plain($values->{$this->field_alias}), $values);
  }
« Last Edit: October 23, 2009, 05:07:44 pm by peterd »
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: turning off mailto in a views civicrm field causes Fatal Error
October 25, 2009, 06:53:56 pm
Fix is available here http://issues.civicrm.org/jira/browse/CRM-5283
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • turning off mailto in a views civicrm field causes Fatal Error

This forum was archived on 2017-11-26.