-
Notifications
You must be signed in to change notification settings - Fork 108
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
Disable non native modules on PS8.0 and onward #498
Disable non native modules on PS8.0 and onward #498
Conversation
b0bdac7
to
9a22f9e
Compare
@PrestaShop/qa-team, @MatShir the issue said to wait for the fix on the core before using it in the module, but the fix is only available on prestashop 8.0 So for now this PR only fixes the problem when upgrading to PrestaShop 8.0. I think something could be done for previous PrestaShop versions, but I won't have time to fix this for previous prestashop versions before the beta. |
9a22f9e
to
628b603
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The modification is legit, that said I believe we already have an existing method in the module to handle this feature:
autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php
Lines 99 to 101 in add52d6
if ($this->container->getUpgradeConfiguration()->shouldDeactivateCustomModules()) { | |
$this->disableCustomModules(); | |
} |
Except it was bound to an option, but maybe instead of adding a new core command to execute and a new service to get from the Symfony container we could rely on existing code and either:
- force the call of
disableCustomModules
in CoreUpgrader80 - force the option
shouldDeactivateCustomModules
to always be true for 80
It also raises the question about the current checkbox, should it be checked and disabled by default so that the user understands that his custom modules will be disabled no matter what?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I misunderstood the purpose of the PR I though it forced disabling custom modules but no It "simply" fixes the function that handle this optional feature
All good for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @matthieu-rolland,
As discussed in slack, I detected this issue:
- Install PS1787 with English language + France country
- Enable mode debug + Disable cache
- install any non-native modules (for example Paypal, https://github.com/PrestaShop/ps_qualityassurance )
- Uninstall problematic modules (welcome mbo metrics facebook psxmarketingwithgoogle, checkout)
- Install the autoupgrade module of this PR
- Upgrade to the release 8.0.0 created from Branch 8.0.x
- See error: the upgrade is stopped
Untitled_.Aug.18.2022.10_15.AM.1.mp4
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To conclure.
- upgrade de 1778 => 8.0.0: NOK as reported previously here: Disable non native modules on PS8.0 and onward #498 (review).
- upgrade de 1787 => 8.0.0: Ok ( disable non native modules enabled) / rollback => OK
- upgrade de 1787 => 8.0.0: Ok ( disable non native modules disabled)
- upgrade de 1787 => 8.0.0: Ok ( disable non native modules enabled): before the upgrade, I used a custom theme which contains different modules non-native
https://user-images.githubusercontent.com/16067358/185869018-2207a306-ca1c-47bc-9dca-b6147ba64f10.mp4 - upgrade 16120 => 16124 Ok (+ php7.1) / php5.6: NOK but not related to this PR reported here: Autoupgrade from older 1.6 versions and PHP compatibility PrestaShop#27087 (comment)
- upgrade 1778 => PS1787: OK
Thanks!
thank you @khouloudbelguith for the sum up ! |
8fbecfd
About It will need to be tested with this PR, but with a release generated from this PR on the core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK for me once the CI has been fixed (CS fixer, PHPStan, ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like @jo: the code is OK but CI needs to pass
9f24d72
to
d537046
Compare
d537046
to
d60e1b9
Compare
9b31c1e
to
7bc1374
Compare
526db93
to
45ee390
Compare
45ee390
to
d389a26
Compare
@khouloudbelguith now it should work when upgrading from 1778, I updated the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @matthieu-rolland,
I am using PHP v7.2.
- "disable non native modules enabled" : Upgrade from PS1.7.7.8 to 8.0.0 using this PR
- Rollback from PS8.0.0 to PS1778 => ok
- Upgrade from PS1778 => 8.0.0: Ok ( disable non-native modules enabled): before the upgrade, I used a custom theme that contains different modules non-native
- "disable non native modules disabled" : Upgrade from PS1.7.7.8 to 8.0.0 using this PR
1778._.8.0.0.mp4
I am using PHP v7.4
- "disable non native modules enabled" : Upgrade from PS1.7.8.7 to 8.0.0 using this PR
- Rollback from PS8.0.0 to PS1.7.8.7 => ok
- Upgrade from PS1.7.8.7 => 8.0.0: Ok ( disable non-native modules enabled): before the upgrade, I used a custom theme that contains different modules non-native
- "disable non native modules disabled" : Upgrade from PS1.7.8.7 to 8.0.0 using this PR
1.7.8.7._.8.0.0.mp4
I am using PHP v7.3
- Upgrade from PS1.7.7.8 to PS1.7.8.7 => OK
- Rollback from PS1.7.8.7 to PS1.7.7.8 => ok
I am using PHP v7.2.
- "disable non native modules enabled" : Upgrade from PS1.7.6.9 to 8.0.0 using this PR
- Rollback from PS8.0.0 to PS1.7.6.9 => ok
- Upgrade from PS1.7.6.9 => 8.0.0: Ok ( disable non-native modules enabled): before the upgrade, I used a custom theme that contains different modules non-native
- "disable non native modules disabled" : Upgrade from PS1.7.6.9 to 8.0.0 using this PR
1.7.6.9._.8.0.0.mp4
Thanks!
Well done everyone! :) |
…ative-modules Disable non native modules on PS8.0 and onward
2/ Install autoupgrade module from this PR
3/ Remove problematic modules (welcome mbo metrics facebook psxmarketingwithgoogle)
4/ Make a release from prestashop 8.0.x with this PR
4/Upgrade your shop via local archive with your generated release
5/ After upgrade, your non native module should be disabled and you should be able to navigate the BO