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

Override a grid's field type fails in some condition #257

Open
zangra-dev opened this issue Jun 30, 2022 · 0 comments
Open

Override a grid's field type fails in some condition #257

zangra-dev opened this issue Jun 30, 2022 · 0 comments

Comments

@zangra-dev
Copy link

zangra-dev commented Jun 30, 2022

This happend while upgrading from sylius 1.8 to 1.10.14 (WIP)
php: 8.1
Symfony: 5.4.10

Example to reproduce:
(grid: sylius_admin_product)

Sylius original grid:

name: type: twig label: sylius.ui.name sortable: translation.name options: template: "@SyliusAdmin/Product/Grid/Field/name.html.twig"
Custom overridden grid:
name: type: string label: sylius.ui.name sortable: translation.name position: 3 {options: ~} (solution)

Grid render searches for the option 'template' of the original field type 'twig'
but field type 'string' is wanted. The errors are showed beneath.
Took some time to figure out where from this error came from...
Simple fix: reset options param options: ~
But maybe the GridRenderer or ... should not search for the parents field option!

Thanks

image
Screenshot from 2022-06-30 12-03-12
("The option "template" does not exist. Defined options are: "".")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant