Skip to content

Commit

Permalink
ENGCOM-4751: Fixed "Please specify the admin custom URL" error on app…
Browse files Browse the repository at this point in the history
…:config:import CLI command #22281
  • Loading branch information
sidolov authored Apr 18, 2019
2 parents 9a4f725 + 333ebbb commit fdf9a74
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
namespace Magento\Config\Model\Config\Backend\Admin;

/**
* Process custom admin url during configuration value save process.
*
* @api
* @since 100.0.2
*/
Expand Down Expand Up @@ -56,8 +58,9 @@ public function beforeSave()
{
$value = $this->getValue();
if ($value == 1) {
$customUrl = $this->getData('groups/url/fields/custom/value');
if (empty($customUrl)) {
$customUrlField = $this->getData('groups/url/fields/custom/value');
$customUrlConfig = $this->_config->getValue('admin/url/custom');
if (empty($customUrlField) && empty($customUrlConfig)) {
throw new \Magento\Framework\Exception\LocalizedException(__('Please specify the admin custom URL.'));
}
}
Expand Down

0 comments on commit fdf9a74

Please sign in to comment.