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
Customer::Gender is required but might be empty if removed from form #8493
Comments
@kochen this behavior is actually correct. If you remove this field from template, you should also remove it from the form. (using form type extension) |
@pjedrzejewski that's true, but it'd also require you to remove the attribute from the DB. |
@kochen but this should happen on the Customer object already in the constructor here:
|
@pjedrzejewski yes, but it doesn't happen :) |
I don't know why this issue was closed although the provided PR is still unmerged. However, i've found the following fixes: a) write an own GenderType according to the draft of @kochen (https://github.com/kochen/Sylius/blob/36099fbbc6f70484595b1e0a082031b548fafc6b/src/Sylius/Bundle/CustomerBundle/Form/Type/GenderType.php#L37) b) override the "gender"-type like this:
|
set gender `u` as default value - resolves #8493
* 1.1: Apply coding standard fixes Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves #8493 [Order] Fixed sylius:remove-expired-carts help Make ArrayGridProvider more performant & suitable for PHP-PM [Documentation] Fix API example for creating a taxon
* 1.2: Apply coding standard fixes Apply coding standard fixes Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves #8493 [ThemeBundle] Fix risky tests [Order] Fixed sylius:remove-expired-carts help remove shared storage call to save password reset token Make ArrayGridProvider more performant & suitable for PHP-PM Update gulpfile.babel.js [Documentation] Fix API example for creating a taxon few changes after code review [Behat] add Changing my account password with token I received scenario
* 1.3: (22 commits) Apply coding standard fixes Apply coding standard fixes Apply coding standard fixes Update Composer's branch-alias for 1.3 Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves #8493 [ThemeBundle] Fix risky tests [Order] Fixed sylius:remove-expired-carts help remove shared storage call to save password reset token Make ArrayGridProvider more performant & suitable for PHP-PM Update gulpfile.babel.js [Documentation] Fix API example for creating a taxon ...
* 1.1: Apply coding standard fixes Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves Sylius#8493 [Order] Fixed sylius:remove-expired-carts help Make ArrayGridProvider more performant & suitable for PHP-PM [Documentation] Fix API example for creating a taxon
* 1.2: Apply coding standard fixes Apply coding standard fixes Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves Sylius#8493 [ThemeBundle] Fix risky tests [Order] Fixed sylius:remove-expired-carts help remove shared storage call to save password reset token Make ArrayGridProvider more performant & suitable for PHP-PM Update gulpfile.babel.js [Documentation] Fix API example for creating a taxon few changes after code review [Behat] add Changing my account password with token I received scenario
* 1.1: Apply coding standard fixes Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves Sylius#8493 [Order] Fixed sylius:remove-expired-carts help Make ArrayGridProvider more performant & suitable for PHP-PM [Documentation] Fix API example for creating a taxon
* 1.2: Apply coding standard fixes Apply coding standard fixes Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves Sylius#8493 [ThemeBundle] Fix risky tests [Order] Fixed sylius:remove-expired-carts help remove shared storage call to save password reset token Make ArrayGridProvider more performant & suitable for PHP-PM Update gulpfile.babel.js [Documentation] Fix API example for creating a taxon few changes after code review [Behat] add Changing my account password with token I received scenario
* 1.3: (22 commits) Apply coding standard fixes Apply coding standard fixes Apply coding standard fixes Update Composer's branch-alias for 1.3 Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves Sylius#8493 [ThemeBundle] Fix risky tests [Order] Fixed sylius:remove-expired-carts help remove shared storage call to save password reset token Make ArrayGridProvider more performant & suitable for PHP-PM Update gulpfile.babel.js [Documentation] Fix API example for creating a taxon ...
* 1.1: Apply coding standard fixes Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves Sylius#8493 [Order] Fixed sylius:remove-expired-carts help Make ArrayGridProvider more performant & suitable for PHP-PM [Documentation] Fix API example for creating a taxon
* 1.2: Apply coding standard fixes Apply coding standard fixes Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves Sylius#8493 [ThemeBundle] Fix risky tests [Order] Fixed sylius:remove-expired-carts help remove shared storage call to save password reset token Make ArrayGridProvider more performant & suitable for PHP-PM Update gulpfile.babel.js [Documentation] Fix API example for creating a taxon few changes after code review [Behat] add Changing my account password with token I received scenario
* 1.1: Apply coding standard fixes Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves Sylius#8493 [Order] Fixed sylius:remove-expired-carts help Make ArrayGridProvider more performant & suitable for PHP-PM [Documentation] Fix API example for creating a taxon
* 1.2: Apply coding standard fixes Apply coding standard fixes Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves Sylius#8493 [ThemeBundle] Fix risky tests [Order] Fixed sylius:remove-expired-carts help remove shared storage call to save password reset token Make ArrayGridProvider more performant & suitable for PHP-PM Update gulpfile.babel.js [Documentation] Fix API example for creating a taxon few changes after code review [Behat] add Changing my account password with token I received scenario
* 1.1: Apply coding standard fixes Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves Sylius#8493 [Order] Fixed sylius:remove-expired-carts help Make ArrayGridProvider more performant & suitable for PHP-PM [Documentation] Fix API example for creating a taxon
* 1.2: Apply coding standard fixes Apply coding standard fixes Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves Sylius#8493 [ThemeBundle] Fix risky tests [Order] Fixed sylius:remove-expired-carts help remove shared storage call to save password reset token Make ArrayGridProvider more performant & suitable for PHP-PM Update gulpfile.babel.js [Documentation] Fix API example for creating a taxon few changes after code review [Behat] add Changing my account password with token I received scenario
* 1.1: Apply coding standard fixes Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves Sylius#8493 [Order] Fixed sylius:remove-expired-carts help Make ArrayGridProvider more performant & suitable for PHP-PM [Documentation] Fix API example for creating a taxon
* 1.2: Apply coding standard fixes Apply coding standard fixes Update "Configuring taxation" docs [GridBundle] Do not put unnecessary "andWhere" in ExpressionBuilder [Grid] Fix getting enabled grid items [ThemeBundle] Replace "symfony/symfony" dependency with specific Symfony packages Keep the existing pagination when changing sorting on product list page Fix API validation tests [ShippingBundle] Add validation for ShippingMethod calculator Narrow down selectors to prevent unexpected bugs [CoreBundle] Make sure promotion action/rule amount is an integer set gender `u` as default value - resolves Sylius#8493 [ThemeBundle] Fix risky tests [Order] Fixed sylius:remove-expired-carts help remove shared storage call to save password reset token Make ArrayGridProvider more performant & suitable for PHP-PM Update gulpfile.babel.js [Documentation] Fix API example for creating a taxon few changes after code review [Behat] add Changing my account password with token I received scenario
Customer::Gender is a required field:
which has a default value
u
.but when being removed (i.e not needed for the shop) from
.../vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Resources/views/Account/profileUpdate.html.twig
:<div class="field">{{ form_row(form.gender) }}</div>
you get an error saying:
This issue seem to occur as well from the API - @psihius could you confirm/elaborate?
The text was updated successfully, but these errors were encountered: