PrestaShop
PrestaShop copied to clipboard
Show errors when installing a module fails
Questions | Answers |
---|---|
Branch? | develop |
Description? | When a module install fails during the shop install process, no error details are shown. With this change, error messages coming from the server are displayed. Thanks to this change, you can now find out which module triggered the error. |
Type? | bug fix |
Category? | IN |
BC breaks? | no |
Deprecations? | no |
Fixed ticket? | N/A |
Related PRs | n/a |
How to test? | Add a module that won't install for some reason in the modules directory. Install PrestaShop. Without the PR, no error message is shown. With the PR, the backend's error message is shown (and you can tell which module failed). |
Possible impacts? | None that I can see |
Screenshot:
I test the PR and for me it's good,
For the QA : Before the installation you must have a module with an error, you can for example unzip this module in the modules folder
https://user-images.githubusercontent.com/5064590/177830995-0363ca7d-f5d4-413d-ae8e-718d37bcd3e7.mp4
No issue for this PR @eternoendless ?
Hi @eternoendless,
Thank you for your PR, I tested it and it works partially, even with many modules but, currently, if we have some problems with modules that are link with the theme, the installation will fail without denounciate the module. As we can see on this video :
https://user-images.githubusercontent.com/100699445/178512020-91104bc5-5c4d-45c1-bf31-3ca28d94baef.mp4
To do it :
- Go to [your.prestashop.folder]/modules
- Take one folder wich have a .tpl file
- Change the [name.of.the.folder].php
- Find the function "Install"
- Write "return false;" before the return of the function
@eternoendless Friendly reminder
@eternoendless Friendly reminder
@eternoendless 😄
I'll try and have a look, but IMO that's out of the scope of this PR
@PrestaShop/qa-team can this extra scenario wait for a different PR? 🤔
hi @eternoendless
IMO it's in the scope. Indeed, we have red notice because of a module issue (I use the same things than other module, just this one have a files .tpl in its files). If you prefer, I can writte a new issue, validate this PR and we have another issue to solve after this one because, for me, this issue is partially solved
Waiting for your feedback
@eternoendless what do you think?
I'm not sure when or even if I will have time to go further on this PR. I think that partially fixing a problem is better than not fixing the problem at all.
@AureRita
Hey, here's my proposition. Let's agree on improving one thing, and then we can improve the second. Those are different steps of installation. Let's try to have something merged instead of blocking this as a whole. What do you think?
QA approved, well done! Message to the maintainers: do not forget to milestone it before the merge.
Thanks @eternoendless