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

Jquery-migrate generates many messages in the console #15943

Closed
matthieu-rolland opened this issue Oct 14, 2019 · 10 comments · Fixed by #20738
Closed

Jquery-migrate generates many messages in the console #15943

matthieu-rolland opened this issue Oct 14, 2019 · 10 comments · Fixed by #20738
Labels
1.7.7.x Branch Developer Feature Developer-oriented feature Fixed Resolution: issue closed because fixed Nice-to-have Kanban prioritization: issue could be included in next version PR available Solution: issue is being addressed Regression Type: regression
Milestone

Comments

@matthieu-rolland
Copy link
Contributor

matthieu-rolland commented Oct 14, 2019

Since upgrading jquery and adding jquery-migrate, we have many warning logs in the console:

Screenshots
Capture d’écran 2019-10-14 à 15 15 24

Questions needing answers

Should we remove them? Should it be kept here? Should we display it but only in dev environment ? If so, how is this done following best practices ?

@matks matks added the Developer Feature Developer-oriented feature label Oct 14, 2019
@khouloudbelguith
Copy link
Contributor

Ping @PrestaShop/prestashop-core-developers

@khouloudbelguith khouloudbelguith added the Waiting for dev Status: action required, waiting for tech feedback label Oct 14, 2019
@Progi1984
Copy link
Contributor

@matthieu-rolland It seems that it's the normal behavior with the use of a development version : https://github.com/jquery/jquery-migrate#debugging. Else you can use jQuery.migrateMute.

@PierreRambaud
Copy link
Contributor

We mustn't use jQuery.migrateMute. Like every deprecated messages we must do our best to update our code and always use latest functions.
This only mean we have some js codes that need to be updated 😅

@matthieu-rolland
Copy link
Contributor Author

@PierreRambaud that's the question, do we consider that those messages should be displayed even in production ?

@PierreRambaud
Copy link
Contributor

I think yes, it's related to the front and only available in console, which means you're watching "js logs".
It will force everyone to update dependencies and fix it, instead of hiding them.
But maybe we need to have @eternoendless' feedbacks

@eternoendless
Copy link
Member

Can this be enabled in dev mode and disabled in prod mode?
Do the deprecation messages only appear if the deprecated functions are used? In that case, we must update our usage of deprecated functions.

@PierreRambaud
Copy link
Contributor

We should be able to use: https://github.com/jquery/jquery-migrate/blob/master/src/migratemute.js

@NeOMakinG
Copy link

Can this be enabled in dev mode and disabled in prod mode?
Do the deprecation messages only appear if the deprecated functions are used? In that case, we must update our usage of deprecated functions.

it looks like deprecated messages appears even if we don't use these functions, tried to find a "delegate" function use on FO core and classic files, couldn't find anything

BTW, we should maybe check every deprecated messages, in order to be sure we don't use any function that is deprecated!

@matthieu-rolland matthieu-rolland moved this from Backlog to In progress in PrestaShop 1.7.7.3 Aug 26, 2020
@prestashop-issue-bot prestashop-issue-bot bot added the WIP Status: Work In Progress label Aug 26, 2020
@marionf marionf added Regression Type: regression Nice-to-have Kanban prioritization: issue could be included in next version 1.7.7.x Branch labels Aug 26, 2020
@matthieu-rolland
Copy link
Contributor Author

Can this be enabled in dev mode and disabled in prod mode?
Do the deprecation messages only appear if the deprecated functions are used? In that case, we must update our usage of deprecated functions.

it looks like deprecated messages appears even if we don't use these functions, tried to find a "delegate" function use on FO core and classic files, couldn't find anything

BTW, we should maybe check every deprecated messages, in order to be sure we don't use any function that is deprecated!

Definitely, maybe we can plan this for 1.7.8 ?

Because we will upgrade jquery to the next minor version. Dealing with these deprecations is probably not urgent for 1.7.7, and we're short on time for the 1.7.7 release...

@matthieu-rolland matthieu-rolland moved this from In progress to To be tested in PrestaShop 1.7.7.3 Aug 26, 2020
@matthieu-rolland matthieu-rolland moved this from To be tested to To be reviewed in PrestaShop 1.7.7.3 Aug 26, 2020
@marionf marionf moved this from To be reviewed to To be tested in PrestaShop 1.7.7.3 Aug 31, 2020
@SD1982 SD1982 moved this from To be tested to To be merged in PrestaShop 1.7.7.3 Aug 31, 2020
@Progi1984 Progi1984 added this to the 1.7.7.0 milestone Aug 31, 2020
@Progi1984
Copy link
Contributor

Fixed by #20738

PrestaShop 1.7.7.3 automation moved this from To be merged to Done Aug 31, 2020
@prestashop-issue-bot prestashop-issue-bot bot added the Fixed Resolution: issue closed because fixed label Aug 31, 2020
@Progi1984 Progi1984 added PR available Solution: issue is being addressed and removed WIP Status: Work In Progress Waiting for dev Status: action required, waiting for tech feedback labels Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.7.7.x Branch Developer Feature Developer-oriented feature Fixed Resolution: issue closed because fixed Nice-to-have Kanban prioritization: issue could be included in next version PR available Solution: issue is being addressed Regression Type: regression
Projects
No open projects
8 participants