PrestaShop icon indicating copy to clipboard operation
PrestaShop copied to clipboard

Show errors when installing a module fails

Open eternoendless opened this issue 2 years ago • 5 comments

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: Screenshot 2022-07-04 at 13 43 09

eternoendless avatar Jul 04 '22 11:07 eternoendless

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 ?

ghost avatar Jul 07 '22 17:07 ghost

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 :

  1. Go to [your.prestashop.folder]/modules
  2. Take one folder wich have a .tpl file
  3. Change the [name.of.the.folder].php
  4. Find the function "Install"
  5. Write "return false;" before the return of the function

AureRita avatar Jul 12 '22 14:07 AureRita

@eternoendless Friendly reminder

matks avatar Aug 31 '22 20:08 matks

@eternoendless Friendly reminder

@eternoendless 😄

matks avatar Sep 22 '22 19:09 matks

I'll try and have a look, but IMO that's out of the scope of this PR

eternoendless avatar Sep 23 '22 11:09 eternoendless

@PrestaShop/qa-team can this extra scenario wait for a different PR? 🤔

kpodemski avatar Oct 28 '22 22:10 kpodemski

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

AureRita avatar Oct 31 '22 15:10 AureRita

@eternoendless what do you think?

kpodemski avatar Nov 10 '22 08:11 kpodemski

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.

eternoendless avatar Nov 10 '22 11:11 eternoendless

@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?

kpodemski avatar Jan 12 '23 21:01 kpodemski

QA approved, well done! Message to the maintainers: do not forget to milestone it before the merge.

prestonBot avatar Jan 15 '23 21:01 prestonBot

Thanks @eternoendless

kpodemski avatar Jan 16 '23 07:01 kpodemski