Skip to content

Commit a1daa45

Browse files
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - #22422: Backport - Fix importFromArray by setting _isCollectionLoaded to true after import #21869 (by @slackerzz) - #22282: [Backport] Fixed "Please specify the admin custom URL" error on app:config:import CLI command (by @davidalger) Fixed GitHub Issues: - #21868: Method importFromArray from \Magento\Eav\Model\Entity\Collection\AbstractCollection doesn't return a working collection (reported by @slackerzz) has been fixed in #22422 by @slackerzz in 2.2-develop branch Related commits: 1. e1f91d1 - #15090: app:config:import fails with "Please specify the admin custom URL." (reported by @BlitzInternet) has been fixed in #22282 by @davidalger in 2.2-develop branch Related commits: 1. e12eeaa
2 parents 14e5d75 + 499cdc1 commit a1daa45

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/code/Magento/Config/Model/Config/Backend/Admin/Usecustom.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ public function beforeSave()
5656
{
5757
$value = $this->getValue();
5858
if ($value == 1) {
59-
$customUrl = $this->getData('groups/url/fields/custom/value');
60-
if (empty($customUrl)) {
59+
$customUrlField = $this->getData('groups/url/fields/custom/value');
60+
$customUrlConfig = $this->_config->getValue('admin/url/custom');
61+
if (empty($customUrlField) && empty($customUrlConfig)) {
6162
throw new \Magento\Framework\Exception\LocalizedException(__('Please specify the admin custom URL.'));
6263
}
6364
}

app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,7 @@ public function importFromArray($arr)
10351035
$this->_items[$entityId]->addData($row);
10361036
}
10371037
}
1038+
$this->_setIsLoaded();
10381039
return $this;
10391040
}
10401041

0 commit comments

Comments
 (0)