When I create a node the Views cache is not cleared in the pages which the node should be listed. When I remove a node the cache is cleared. The log says this every time I create a node:

require_once(./sites/all/modules/views/includes/view.inc) [function.require-once]: failed to open stream: No such file or directory in /www/path/to/example.com/public_html/beta/sites/all/modules/views/views.module on line 511.

Where /path/to/example.com/ is the correct path.

And yes I have checked the "Clear all cached views pages associated with a node on insert". When I uncheck this the error message disappears, so it should be there where it fails.

I use Views 6.x-2.8

CommentFileSizeAuthor
#3 boost-652508.patch2.16 KBmikeytown2
#1 boost-652508.patch908 bytesmikeytown2

Comments

mikeytown2’s picture

StatusFileSize
new908 bytes

strange error; here's the code in views

/**
 * Include views .inc files as necessary.
 */
function views_include($file) {
  static $used = array();
  if (!isset($used[$file])) {
    require_once './' . drupal_get_path('module', 'views') . "/includes/$file.inc";
  }

  $used[$file] = TRUE;
}

My guess is i need to chdir like I do for the output buffer shutdown function

  // Ensure we're in the correct working directory, since some web servers (e.g. Apache) mess this up here.
  chdir(dirname($_SERVER['SCRIPT_FILENAME']));

try this patch

mikeytown2’s picture

Status: Active » Needs review
mikeytown2’s picture

StatusFileSize
new2.16 KB

looking into this issue more; it appear you can't load a file with a relative path inside a shutdown function; at least not reliably.
#337615: require_once failure on cron with modules that have a register_shutdown_function
#331357: Requires are unanchored

This patch should do the trick

TheInspector’s picture

Your first patch did the trick good, I'll test your second one later. Thank you!

mikeytown2’s picture

Status: Needs review » Fixed

committed

Status: Fixed » Closed (fixed)

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