Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after filtering date in error logs #14785

Closed
ChineseNorris opened this issue Jul 19, 2019 · 4 comments

Comments

@ChineseNorris
Copy link

commented Jul 19, 2019

Describe the bug
After filtering the error log in the back office I get the following error (debug mode enabled)

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 (object_type LIKE :object_type) AND (l.date_add BETWEEN :date_from AND :date_to) ORDER BY id_log desc LIMIT 20 OFFSET 0' with params ["2019-07-19", "2019-07-19"]:

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

To Reproduce
Steps to reproduce the behavior:

  1. Go to BO/Advanced parameters/error logs
  2. Click on Date range and click filter
  3. See error

Additional information
PrestaShop version: 1.7.5.1
PHP version: 7.2

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2019

Hi @ChineseNorris,

Thanks for your report.
I manage to reproduce the issue with PS1.7.6.0 & PS1.7.5.2 when debug mode enabled.
I tried to make a filter by two fields => Date + another field => the exception will be displayed.

Filtering by only one field => OK
image

I’ll add this to the debug roadmap so that it’s fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!

@ChineseNorris

This comment has been minimized.

Copy link
Author

commented Jul 22, 2019

Hi @khouloudbelguith ,

thank you for reproducing the issue, I'm trying to clear at least the filter but without success, I've tried using another account to get the method for resetting the filter but I get error 405 "Method not allowed".

I need to reset the filter first and then I'll try to find a solution for the bug.

Regards

@matks matks added the migration label Jul 23, 2019

@matks

This comment has been minimized.

Copy link
Contributor

commented Jul 23, 2019

We need to fix this bug and add Behat tests to make sure it does not come back 😄

@sarahdib sarahdib added Fixed and removed To Do labels Jul 31, 2019

@sarahdib sarahdib added this to the 1.7.6.1 milestone Jul 31, 2019

@sarahdib sarahdib added this to Backlog in PrestaShop 1.7.6 via automation Jul 31, 2019

@sarahdib sarahdib moved this from Backlog to In progress in PrestaShop 1.7.6 Jul 31, 2019

@sarahdib sarahdib moved this from Backlog to To be tested in PrestaShop 1.7.6 Jul 31, 2019

@sarahdib sarahdib moved this from To be tested to To be merged in PrestaShop 1.7.6 Jul 31, 2019

@marionf marionf closed this Aug 1, 2019

PrestaShop 1.7.6 automation moved this from To be merged to Done Aug 1, 2019

This was referenced Aug 7, 2019
@01park

This comment has been minimized.

Copy link

commented Aug 26, 2019

I applied the fixed files and the error is gone, but when I want to filter an employee on employee number or name, I get no results for a selected date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
6 participants
You can’t perform that action at this time.