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) »
  • CiviCRM Views error
Pages: [1]

Author Topic: CiviCRM Views error  (Read 1903 times)

macp0004

  • Guest
CiviCRM Views error
February 03, 2010, 05:43:12 am
Hi Folks,

Any help with this error much appreciated - I ran some searches and have not been able to fix

warning: require_once(CRM/Core/BAO/CustomOption.php) [function.require-once]: failed to open stream: No such file or directory in /home7/hscairso/public_html/registrationandtraining/sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm_handler_field_custom.inc on line 39.

One thread said it was permissions - I went and changed the permissions on Drupal so authenticated user had access to all CiviCRM functions

What should I do next  - I ran searches on Google / Drupal and CiviCRM with no luck for solutions

macp0004

  • Guest
Re: CiviCRM Views error
February 03, 2010, 06:03:32 am
How did I get this error?

I was adding a custom CiviCRM field to Drupal views.

A last name field works fine - as soon as I add a custom CiviCRM field I get the error

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviCRM Views error
February 03, 2010, 07:38:38 am

1. can u empty your views cache

2. if that does not fix the issue, can u try this patch:

Code: [Select]
svn diff drupal/modules/views/civicrm/civicrm_handler_field_custom.inc
Index: drupal/modules/views/civicrm/civicrm_handler_field_custom.inc
===================================================================
--- drupal/modules/views/civicrm/civicrm_handler_field_custom.inc       (revision 26124)
+++ drupal/modules/views/civicrm/civicrm_handler_field_custom.inc       (working copy)
@@ -30,6 +30,7 @@
  */
 class civicrm_handler_field_custom extends views_handler_field {
     function construct( ) {
+        civicrm_initialize( );
     }
 
     function render( $values ) {

please let us know if this works,
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

macp0004

  • Guest
Re: CiviCRM Views error
February 03, 2010, 07:48:08 am
Lobo - that patch worked - thank you VERY much for this fast work.

As feedback - building a conference support site for a national conference.

Very happy with CiviCRM!

Paul Jacobson

  • Guest
Re: CiviCRM Views error
February 06, 2010, 09:59:39 pm
I was getting the same error with a view accessing custom CiviCRM data with 3.1.1 and found this thread via google. The patch worked here also.

cheers
Paul

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • CiviCRM Views error

This forum was archived on 2017-11-26.