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

Fix date formatting #945

Merged
merged 3 commits into from Nov 14, 2023
Merged

Fix date formatting #945

merged 3 commits into from Nov 14, 2023

Conversation

Hlavtox
Copy link
Contributor

@Hlavtox Hlavtox commented Nov 11, 2023

Questions Answers
Description? We were happily calling a function with a wrong argument count. This fixes it.
Type? bug fix
BC breaks? no
Deprecations? no
Fixed ticket? Fixes tests in PrestaShop/PrestaShop#34521, which revealed this issue when I typed displayDate method.
How to test? See steps below.

What is wrong

The method Tools::displayDate was changed between 1.7.8 and 8.0.0, and this module was calling the old version, resulting in some errors in developer mode.
https://github.com/PrestaShop/PrestaShop/blob/1951311beb2497bb97659aded1b643905403becc/classes/Tools.php#L981
https://github.com/PrestaShop/PrestaShop/blob/f64f657366caf66e01f3b4fccaad4b77989a1257/classes/Tools.php#L923

How to test (do these steps on both versions)

  1. Get 1.7.8 and 8.0.0
  2. Install this module. (Make sure to uninstall distribution api.)
  3. Go to BO > Advanced parameters > Performance and set Forced compilation and disable cache in Smarty section.
  4. Go to settings of this module and check that you see date normally in the template list, like below. ⬇️

Snímek obrazovky 2023-11-13 180353

@Hlavtox Hlavtox added this to the 3.14.1 milestone Nov 11, 2023
@Hlavtox
Copy link
Contributor Author

Hlavtox commented Nov 13, 2023

@florine2623 Added some steps to reproduce. :-)

@florine2623 florine2623 self-assigned this Nov 14, 2023
Copy link
Contributor

@florine2623 florine2623 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Hlavtox ,

I can't see the new date format 😞

I have followed your steps. Also, cleared cache from PS and from browser as well. The old format is still displayed.
Screenshot 2023-11-14 at 15 10 06

Am I missing something ? ^^

@florine2623 florine2623 added waiting for author Waiting for author's feedback and removed Waiting for QA labels Nov 14, 2023
@florine2623 florine2623 removed their assignment Nov 14, 2023
@Hlavtox
Copy link
Contributor Author

Hlavtox commented Nov 14, 2023

Yes, just the fact that you don't have any errors makes this QA ✅. :-)

@florine2623 florine2623 self-assigned this Nov 14, 2023
@florine2623 florine2623 added QA ✔️ and removed waiting for author Waiting for author's feedback labels Nov 14, 2023
@florine2623
Copy link
Contributor

Yes indeed, the date format changes on your country. I didn't think about that, sorry ^^

@Hlavtox Hlavtox merged commit a46852f into PrestaShop:dev Nov 14, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
4 participants