Jump to content

PS 1.7.5.1 Employee Logs "Employee not found"


8ternity

Recommended Posts

Hi,

I've started build a store in the last months and i have this error happen when i try to get a complete log of employee modifications into the system.

I think it was initially installed has 1.7.5.0 and updated to 1.7.5.1.

The error is :

Value for :employee not found in params array. Params array key should be "employee"

Here more Symfony log :

Uncaught Exception: An exception occurred while executing 'SELECT l.*, e.email, CONCAT(e.firstname, ' ', e.lastname) as employee FROM ps_log l LEFT JOIN ps_employee e ON l.id_employee = e.id_employee WHERE (e.lastname LIKE :employee OR e.firstname LIKE :employee) AND (l.date_add BETWEEN :date_from AND :date_to) ORDER BY id_log desc LIMIT 10 OFFSET 0' with params ["2019\/10\/01", "2019\/10\/07"]: Value for :employee not found in params array. Params array key should be "employee"


Uncaught PHP Exception Doctrine\DBAL\DBALException: "An exception occurred while executing 'SELECT l.*, e.email, CONCAT(e.firstname, ' ', e.lastname) as employee FROM ps_log l LEFT JOIN ps_employee e ON l.id_employee = e.id_employee WHERE (e.lastname LIKE :employee OR e.firstname LIKE :employee) AND (l.date_add BETWEEN :date_from AND :date_to) ORDER BY id_log desc LIMIT 10 OFFSET 0' with params ["2019\/10\/01", "2019\/10\/07"]: Value for :employee not found in params array. Params array key should be "employee"" at /var/www/vhosts/******/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 131

I've think first it may be related to database update, but seems to be identical has installation .sql on install folder.

Any clue on how resolving the issue?

Link to comment
Share on other sites

there is a problem in  "src\PrestaShopBundle\Entity\Repository\LogRepository.php" file at line 244
instead of

$qb->setParameters(array(
                        'date_from' => $filterValue['from'],
                        'date_to' => $filterValue['to'],
                    ));

should be

                   $qb->setParameters(array_merge(
                        $qb->getParameters(),
                        array(
                        'date_from' => $filterValue['from'],
                        'date_to' => $filterValue['to']
                        )
                    ));

 

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...