Jump to content

[Bug] Panneau d'administration >> Stats >> Newsletter


Recommended Posts

Bonjour,

Je viens de faire une mise à jour V1.2.4 -> V1.2.5

Dans le BO, Panneau d'administration >> Stats >> Newsletter, il apparaît le message d'erreur suivant :

Unknown column 'n.date_add' in 'where clause'
SELECT COUNT(*) as visitors
FROM ps_newsletter n
WHERE n.`date_add` BETWEEN '2009-08-23 00:00:00' AND '2009-09-23 23:59:59'

En effet, la date indiquant l'insertion dans table "ps_newsletter" n'est pas "date_add", mais "newsletter_date_add".

Cordialement.

Link to comment
Share on other sites

  • 3 weeks later...

Bonjour JMPJMP,

Pour corriger ce bug, il faut éditer le fichier modules/statsnewsletter/statsnewsletter.php

A la ligne 57, remplacer :


$result2 = Db::getInstance()->getRow('
SELECT COUNT(*) as visitors
FROM '._DB_PREFIX_.'newsletter n
WHERE n.`date_add` BETWEEN '.ModuleGraph::getDateBetween());

Par

$result2 = Db::getInstance()->getRow('
SELECT COUNT(*) as visitors
FROM '._DB_PREFIX_.'newsletter n
WHERE n.`newsletter_date_add` BETWEEN '.ModuleGraph::getDateBetween());

A la ligne 75, remplacer :

$this->_query2 = '
SELECT n.date_add
FROM '._DB_PREFIX_.'newsletter n
WHERE n.`date_add` BETWEEN ';

Par

$this->_query2 = '
SELECT n.newsletter_date_add
FROM '._DB_PREFIX_.'newsletter n
WHERE n.`newsletter_date_add` BETWEEN ';


Cordialement.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...