Skip to content

Commit fdf9a74

Browse files
authored
ENGCOM-4751: Fixed "Please specify the admin custom URL" error on app:config:import CLI command #22281
2 parents 9a4f725 + 333ebbb commit fdf9a74

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
namespace Magento\Config\Model\Config\Backend\Admin;
1111

1212
/**
13+
* Process custom admin url during configuration value save process.
14+
*
1315
* @api
1416
* @since 100.0.2
1517
*/
@@ -56,8 +58,9 @@ public function beforeSave()
5658
{
5759
$value = $this->getValue();
5860
if ($value == 1) {
59-
$customUrl = $this->getData('groups/url/fields/custom/value');
60-
if (empty($customUrl)) {
61+
$customUrlField = $this->getData('groups/url/fields/custom/value');
62+
$customUrlConfig = $this->_config->getValue('admin/url/custom');
63+
if (empty($customUrlField) && empty($customUrlConfig)) {
6164
throw new \Magento\Framework\Exception\LocalizedException(__('Please specify the admin custom URL.'));
6265
}
6366
}

0 commit comments

Comments
 (0)