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

Added hidden element before multiselect form elements in adminhtml #3352

Merged
merged 5 commits into from
Jul 6, 2023

Conversation

Hanmac
Copy link
Contributor

@Hanmac Hanmac commented Jun 26, 2023

Description (*)

This makes it possible for a Multiselect EAV Attribute to set no values inside a store view while the global settings still has values.

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes Product EAV and MultiSelect problem with StoreView and Default #2065

Manual testing scenarios (*)

  1. Create an Product EAV Attribute with Multiselect as Input and StoreView
  2. Configure the Product in Global Store to have some values in the input
  3. go so store specific config, now simultaneously disable the "Use Default Value" Option AND also remove all elements from the list
  4. the empty value for StoreView can't be saved at the same time as "Use Default Value" is disabled (because the hidden input is missing)

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@github-actions github-actions bot added Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/* labels Jun 26, 2023
@Hanmac Hanmac requested a review from kiatng June 27, 2023 14:16
@fballiano
Copy link
Contributor

I can't replicate the problem, here's my test, on the main branch

this is the default scope, with 3 selected values
Screenshot 2023-07-03 alle 16 04 22

and on the store_view scope I can save the product removing all 3 selected values, with no issue:
Screenshot 2023-07-03 alle 16 04 58

@Piralein
Copy link

Piralein commented Jul 4, 2023

2023-07-04.09-46-38.mp4

@fballiano
Copy link
Contributor

mmm ok I got it, if you first unselect some values (but not all) and save, then unselect everything and save again, then it works.

but unselecting everything at the first round and saving doesn't work

Copy link
Contributor

@fballiano fballiano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested, works perfectly

@fballiano fballiano changed the title Multiselect needs hidden element even when disabled by storeView Added hidden element before multiselect form elements in adminhtml Jul 6, 2023
@fballiano fballiano merged commit 2a352a1 into OpenMage:main Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/*
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Product EAV and MultiSelect problem with StoreView and Default
4 participants