Issue #2094335 by andypost: Statistics.php needs a lower bootstrap level.

8.0.x
Nathaniel Catchpole 2014-02-11 11:27:02 +00:00
parent 2e6c6d71e7
commit 9aa21496ae
2 changed files with 3 additions and 2 deletions

View File

@ -97,4 +97,5 @@ class StatisticsLoggingTest extends WebTestBase {
$node_counter = statistics_get($this->node->id());
$this->assertIdentical($node_counter['totalcount'], '1');
}
}

View File

@ -11,12 +11,12 @@ chdir('../../..');
// Load the Drupal bootstrap.
require_once dirname(dirname(__DIR__)) . '/vendor/autoload.php';
require_once dirname(dirname(__DIR__)) . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_PAGE_CACHE);
drupal_bootstrap(DRUPAL_BOOTSTRAP_KERNEL);
if (\Drupal::config('statistics.settings')->get('count_content_views')) {
$nid = filter_input(INPUT_POST, 'nid', FILTER_VALIDATE_INT);
if ($nid) {
db_merge('node_counter')
\Drupal::database()->merge('node_counter')
->key(array('nid' => $nid))
->fields(array(
'daycount' => 1,