-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: CmsFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release
Description
Preconditions (*)
- 2.1.x
- 2.2.x
- 2.3.x
Steps to reproduce (*)
- Create some class that will load CMS Page:
/**
* Constructor.
*/
public function __construct(
\Magento\Cms\Model\PageFactory $pageFactory
) {
$this->pageFactory = $pageFactory;
}
/** @var \Magento\Cms\Model\Page $page */
$page = $this->pageFactory->create();
$page->setStoreId([2]);
$page->load($identifier, Page::IDENTIFIER);
- According to description for magic function setStoreId must be array in Magento\Cms\Model\Page:
* @method Page setStoreId(array $storeId)
- But in Magento\Cms\Model\ResourceModel\Page in method _getLoadSelect you have this part of code:
if ($object->getStoreId()) {
$storeIds = [
Store::DEFAULT_STORE_ID,
(int)$object->getStoreId(),
];
......
}
- If you will provide array it will be just 1 and not merged with provided array.
Expected result (*)
- If description correct and store_id must be array, then in Resource Model must be changed logic for merging array
- If it must be just int, then it must be changed description for magic function in Magento\Cms\Model\Page
Actual result (*)
- See steps
Metadata
Metadata
Assignees
Labels
Component: CmsFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release