Closed
Description
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
- Currently, I have to re-save an existing block (select every store view except one manually) and only after that, I can finally create a block for a specific store view.
- Previously, I could add a new block and it just works. Magento correctly used the fallback mechanism to show the correct block at every store view.
Additionally, when using a new approach, if I'll create a new store view I have to open cms block again and select newly created store view in store views combo box. Previously all work flawlessly because I always had a default block saved with "All store views" selected.
Preconditions
Magento develop branch
Steps to reproduce
- Install Magento from
develop
branch. - Make sure that you have only one store view and
SingleStoreMode
option in disabled - Create cms block
example
forAll Store views
- Create another cms block
example
for first store view only
Expected result
- Block should be saved for selected store view
Actual result
-
An exception will be thrown:
A block identifier with the same properties already exists in the selected store.
Propose
Validator should validate actual block data, so we can remove the following check completely:
if ($this->_storeManager->hasSingleStore()) {
$stores = [Store::DEFAULT_STORE_ID];
}
OR
this logic should be moved to _beforeSave
and slightly modified, to check SingleStoreMode
option:
if ($this->_storeManager->getSingleStoreMode()) {
$object->setData('stores', [Store::DEFAULT_STORE_ID]);
}
Metadata
Metadata
Assignees
Labels
Gate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.3 release