-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Inconsistent cms block validation and save methods #4831
Comments
@vovayatsyuk, Thanks for the feedback. |
Thanks, I know why it shows an error and I wrote a proposed solution that will fix this behavior. If you'll dig into this a little more, you'll see that validation and save methods are inconsistent: Save method uses data from the request, while validation does not. Validation put a And that is a bug, I think. It's not a valid behavior when validation checks data that will not be saved actually. |
@vovayatsyuk thank you for your bug report. |
I am working on it at #mm17es |
this was fixed already #11805 |
Hi @vovayatsyuk |
Hi @engcom-Bravo. Thank you for working on this issue.
|
✅ Confirmed by @engcom-Bravo Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
Hi @sergey-solo. Thank you for working on this issue.
|
@sdzhepa please revert and allow same identifier for specific store view. |
Hello @vovayatsyuk Thank you for contribution and collaboration! We are not able to reproduce this issue on the latest 2.4-develop branch by provided scenario.
Steps
AR: Block saved successfully Could You take a look? |
Looks like it was fixed in this commit: c8baed5 |
So we have to close it. |
Additional information
The issue was reopened on 16 July 2019.
The reopening reason is that current behavior(after fixes) brings new issues. See comment for details
Preconditions
Magento develop branch
Steps to reproduce
develop
branch.SingleStoreMode
option in disabledexample
forAll Store views
example
for first store view onlyExpected result
Actual result
An exception will be thrown:
Propose
Validator should validate actual block data, so we can remove the following check completely:
https://github.com/magento/magento2/blob/develop/app/code/Magento/Cms/Model/ResourceModel/Block.php#L186-L188
OR
this logic should be moved to
_beforeSave
and slightly modified, to checkSingleStoreMode
option:The text was updated successfully, but these errors were encountered: