PrestaShop / example-modules

Example PrestaShop modules
Academic Free License v3.0
177 stars 118 forks source link

Fatal error with module demoextendtemplates #147

Closed idnovate closed 1 year ago

idnovate commented 1 year ago

When the module demoextendtemplates is installed, this fatal error appears:

image

How to reproduce?

kpodemski commented 1 year ago

@idnovate which PrestaShop version?

idnovate commented 1 year ago

8.0.4

kpodemski commented 1 year ago

@idnovate thanks for reporting, decorating big controllers is tricky as it requires reimplementing all the methods, you can see here: https://github.com/PrestaShop/example-modules/pull/151/commits/03d72adebc4d06b0a087f3a0b26b7814f412c5d1

we'll provide some other examples on how to modify things in controllers

idnovate commented 1 year ago

@idnovate thanks for reporting, decorating big controllers is tricky as it requires reimplementing all the methods, you can see here: 03d72ad

we'll provide some other examples on how to modify things in controllers

Great, this is exactly what I ended up doing, but I thought I was wrong :)

kpodemski commented 1 year ago

@idnovate it looks wrong, I agree 😅 this controller is too big, and hard to decorate, but there are some other solutions, I'll work on some examples after I finish checking modules for 8.1 :)