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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Drupal 6 Upgrade to 4.x warning: file_get_contents filter.js failed to open
Pages: [1]

Author Topic: Drupal 6 Upgrade to 4.x warning: file_get_contents filter.js failed to open  (Read 733 times)

ehowland

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: various
  • PHP version: various
Drupal 6 Upgrade to 4.x warning: file_get_contents filter.js failed to open
October 21, 2013, 12:52:10 pm
After upgrading Civi from 3.4 to 4.3 and when "Optimize JavaScript files:"  was turned on users were getting:

warning: file_get_contents(modules/filter/filter.js) [function.file-get-contents]: failed to open stream: No such file or directory in www/includes/common.inc on line 2520.
warning: file_get_contents(modules/filter/filter.js) [function.file-get-contents]: failed to open stream: No such file or directory in www/includes/common.inc on line 2520.

This turns out to be  a hard coded inclusion of that file in line 280 of sites/all/modules/civicrm/drupal/civicrm.module

{
      //we have to ensure that wysiwyg is loaded since
      //pages load only with ajax callbacks
      $formats = filter_formats();
      foreach ($formats as $id => $format) {
        wysiwyg_get_profile($id);
      }
      $path = drupal_get_path('module', 'filter');
      drupal_add_js($path . '/filter.js');
      drupal_add_css($path . '/filter.css');
    }


Although Drupal 7 has such a file Drupal 6 does not.

The comment explaining the only function in that Drupal 7 file says:

/**
 * Automatically display the guidelines of the selected text format.
 */


So it seems safe to comment out this or change the code in civicrm.module to:

if ( file_exists($path . '/filter.js' ) ) {
 drupal_add_js($path . '/filter.js');
}

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Drupal 6 Upgrade to 4.x warning: file_get_contents filter.js failed to open
October 21, 2013, 02:04:40 pm
Thanks for looking into this.
Do you need any help getting started with submitting patches or pull-requests for CiviCRM?
Try asking your question on the new CiviCRM help site.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Drupal 6 Upgrade to 4.x warning: file_get_contents filter.js failed to open

This forum was archived on 2017-11-26.