Skip to content
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

Gateway timeout status while extending admin twig template #29827

Closed
2 tasks done
adviva opened this issue Sep 30, 2022 · 6 comments
Closed
2 tasks done

Gateway timeout status while extending admin twig template #29827

adviva opened this issue Sep 30, 2022 · 6 comments
Labels
8.0.x Branch Bug Type: Bug Catalog Component: Which BO section is concerned CO Category: Core Invalid Resolution: issue closed because invalid Old Products Page Concerns the old product page

Comments

@adviva
Copy link
Contributor

adviva commented Sep 30, 2022

Prerequisites

Describe the bug and add screenshots

The problem is about the extends of admin template twig from a module in ps 8.0, i think any root template.

When a module extends an admin template twig, this page get infinite loading or a gateway timeout status.

The extend works in previous ps 1.7.8 like this:
{% extends 'PrestaShopBundle:Admin/Product/ProductPage:product.html.twig' %}

Now i have changed the above using bundle name syntax, as described in the notable-changes of the doc:
{% extends '@PrestaShop/Admin/Product/ProductPage/product.html.twig' %}

This single line breaks the page loading.

Expected behavior

Template twig override from a module works and admin page is loaded

Steps to reproduce

  1. Extends an admin template Twig from a module
    for example:
  • @PrestaShop/Admin/Product/CatalogPage/catalog.html.twig
  • @PrestaShop/Admin/Product/ProductPage/product.html.twig
  1. Open the relative admin page

PrestaShop version(s) where the bug happened

8.0

PHP version(s) where the bug happened

7.4

If your bug is related to a module, specify its name and its version

No response

@adviva adviva added Bug Type: Bug New New issue not yet processed by QA labels Sep 30, 2022
@adviva adviva changed the title Gateway Timeout status while extending admin twig templates Gateway timeout status while extending admin twig template Sep 30, 2022
@MhiriFaten
Copy link

Hello @adviva ,

I didn't manage to reproduce the issue with the provided informations.
Could you please provide some screenshots or a screen record of the issue 🙏
Waiting for your feedback.

Thanks!

@MhiriFaten MhiriFaten added Waiting for author Status: action required, waiting for author feedback NMI Status: issue needs more information and removed New New issue not yet processed by QA labels Sep 30, 2022
@hibatallahAouadni hibatallahAouadni added 8.0.x Branch CO Category: Core Catalog Component: Which BO section is concerned Old Products Page Concerns the old product page labels Oct 3, 2022
@adviva
Copy link
Contributor Author

adviva commented Oct 3, 2022

Hello @MhiriFaten,

I attach a test module that extends Admin Product template.
What happen in my case is an infinite loading while opening product page and i have to restart php process.
Let me know if you are able to open the admin product detail after have installed the test module.

Thanks!
pcomtest.zip

@prestashop-issue-bot prestashop-issue-bot bot removed the Waiting for author Status: action required, waiting for author feedback label Oct 3, 2022
@AureRita
Copy link
Contributor

AureRita commented Oct 3, 2022

Hello @adviva,

I reproduced your issue as we can see on this video :

Untitled_.Oct.3.2022.5_27.PM.webm

@PrestaShop/prestashop-maintainers, can you check it if it's not due to the module ?

waiting for your feedback

@AureRita AureRita added TBR Status: issue to be reproduced Waiting for dev Status: action required, waiting for tech feedback and removed NMI Status: issue needs more information labels Oct 3, 2022
@matks
Copy link
Contributor

matks commented Oct 10, 2022

Hello @adviva in the documentation https://devdocs.prestashop-project.org/8/modules/concepts/templating/admin-views/

the extend should be:

{% extends '@!PrestaShop/Admin/Product/CatalogPage/catalog.html.twig' %}

please notice the ! can you try this?

@matks matks added Waiting for author Status: action required, waiting for author feedback and removed Waiting for dev Status: action required, waiting for tech feedback labels Oct 10, 2022
@adviva
Copy link
Contributor Author

adviva commented Oct 11, 2022

Hi @matks
many thanks for your suggestion! It was a really small change to do in our code.

Both the solution with the new namespace @PrestaShopCore and with @!PrestaShop works fine for me

@atomiix
Copy link
Contributor

atomiix commented Oct 11, 2022

I think we can close this issue then! :)

@atomiix atomiix closed this as completed Oct 11, 2022
@AureRita AureRita added Invalid Resolution: issue closed because invalid and removed Waiting for author Status: action required, waiting for author feedback TBR Status: issue to be reproduced labels Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.0.x Branch Bug Type: Bug Catalog Component: Which BO section is concerned CO Category: Core Invalid Resolution: issue closed because invalid Old Products Page Concerns the old product page
Projects
None yet
Development

No branches or pull requests

6 participants