Attempting to bootstrap and run cron from a location other than Drupal's root directory with Views enabled results in the following watchdog warnings:

Warning: include_once(sites/all/modules/views/theme/theme.inc): failed to open stream: No such file or directory in views_theme() (line 61 of /htdocs/sites/all/modules/views/views.module).
Warning: include_once(): Failed opening 'sites/all/modules/views/theme/theme.inc' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in views_theme() (line 61 of /htdocs/sites/all/modules/views/views.module).

This can easily be solved by following core's lead and instead of:
include_once $path . '/theme/theme.inc';
Opt to use:
include_once DRUPAL_ROOT . '/' . $path . '/theme/theme.inc';

CommentFileSizeAuthor
#1 1362662.patch429 bytesdawehner

Comments

dawehner’s picture

StatusFileSize
new429 bytes

Here is a small patch

dawehner’s picture

Status: Needs review » Fixed

Committed that patch to 7.x-3.x

Status: Fixed » Closed (fixed)

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