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

code fixed according @todo #39461

Open
wants to merge 1 commit into
base: 2.4-develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions app/code/Magento/Widget/Model/ResourceModel/Layout/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ public function fetchUpdatesByHandle(
*/
protected function _getFetchUpdatesByHandleSelect($loadAllUpdates = false)
{
//@todo Why it also loads layout updates for store_id=0, isn't it Admin Store View?
//If 0 means 'all stores' why it then refers by foreign key to Admin in `store` and not to something named
// 'All Stores'?
// When `store_id = 0`, it applies to "all stores," including the Admin Store View.

$select = $this->getConnection()->select()->from(
['layout_update' => $this->getMainTable()],
Expand All @@ -96,7 +94,7 @@ protected function _getFetchUpdatesByHandleSelect($loadAllUpdates = false)
'link.layout_update_id=layout_update.layout_update_id',
''
)->where(
'link.store_id IN (0, :store_id)'
'link.store_id = 0 OR link.store_id = :store_id'
)->where(
'link.theme_id = :theme_id'
)->order(
Expand Down