Jump to content
8ternity

PS 1.7.5.1 Employee Logs "Employee not found"

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?

Share this post


Link to post
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']
                        )
                    ));

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More