Prestashop: error in form_shipping.html.twig

Created on 5 Dec 2019  路  8Comments  路  Source: PrestaShop/PrestaShop

Describe the bug
At line 156 of the file /src/PrestaShopBundle/Resources/views/Admin/Product/ProductPage/Forms/form_shipping.html.twig :

{{ include('@PrestaShop/Admin:Product/ProductPage/Forms/form_warehouse_combination.html.twig', { 'warehouses': warehouses, 'form': form }) }}

to work it is necessary to replace":" by" /"

{{ include('@PrestaShop/Admin/Product/ProductPage/Forms/form_warehouse_combination.html.twig', { 'warehouses': warehouses, 'form': form }) }}

To Reproduce

this error appeared in the BO product management
with advanced stock management activated

Additional information
PrestaShop version: 1.7.6.2
PHP version: 7.2

BO Bug No change required Product settings

Most helpful comment

If you want to reproduce this bug:
in table ps_configuration, PS_ADVANCED_STOCK_MANAGEMENT value 1

If you go to a product page then the include is called.

You have this error :
CRITICAL: Uncaught PHP Exception Twig\Error\LoaderError: "Template "@PrestaShop/Admin:Product/ProductPage/Forms/form_warehouse_combination.html.twig" is not defined."

Because the link is false, the link should be :
@PrestaShop/Admin/Product/ProductPage/Forms/form_warehouse_combination.html.twig

All 8 comments

Hi @pyp31,

Thanks for your report.
Can you please add steps to reproduce the issue in a new comment.
In your BO => Shop Parameters => Product Settings page => is there any exception after enabling "stock management"?

Thanks!

there is no exception in
BO => Shop Parameters => Product Settings page =>

exception is in
BO => Catalog => Product when you select a product or add a new product

error is in debug
Template "@PrestaShop/Admin:Product/ProductPage/Forms/form_warehouse_combination.html.twig" is not defined.

@pyp31, I did not manage to reproduce the issue with PS1.7.6.2.
I attached a screen record
https://drive.google.com/file/d/109DpTn1KJG3874yhMFVbQyNtMOp1274j/view
PS: Stock management is enabled by default.

Thanks!

I guess it's because I use a module that uses this file maybe wkwarehouse.
in all cases this file contains an error ( typing), we have to replace : by /

https://drive.google.com/open?id=1k-LbH_YwMIEIa6HxDDHs1EYdBp6bVk76

Regards

@pyp31, As it's not a module provided by Prestashop, we can't do anything with this.
You should contact the module author via your addons.prestashop.com account, they are the only ones to help you with it.
Thanks!

If you want to reproduce this bug:
in table ps_configuration, PS_ADVANCED_STOCK_MANAGEMENT value 1

If you go to a product page then the include is called.

You have this error :
CRITICAL: Uncaught PHP Exception Twig\Error\LoaderError: "Template "@PrestaShop/Admin:Product/ProductPage/Forms/form_warehouse_combination.html.twig" is not defined."

Because the link is false, the link should be :
@PrestaShop/Admin/Product/ProductPage/Forms/form_warehouse_combination.html.twig

Hi @marketiweb85,

If you want to reproduce this bug:
in table ps_configuration, PS_ADVANCED_STOCK_MANAGEMENT value 1

But this is will be incorrect, we cannot edit the database to reproduce an issue.
We need to find the exact steps to reproduce the issue from the BO or FO.

Thanks!

As you wish, but this is just a typo. The person wanted to write / and wrote :

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matks picture matks  路  3Comments

hiousi picture hiousi  路  3Comments

wikao2 picture wikao2  路  3Comments

vincent-dp picture vincent-dp  路  3Comments

khouloudbelguith picture khouloudbelguith  路  3Comments