[2.1] Unable to get store URL from admin #5322

acharrex opened this Issue Jun 28, 2016 · 1 comment


None yet

4 participants

acharrex commented Jun 28, 2016 edited

Steps to reproduce

  1. Install Magento 2.1 from develop branch.
  2. Run the following code from the admin area (by example from a controller):
$url = $this->_objectManager->get('Magento\Store\Model\StoreManagerInterface')
    ->getStore(1) // 1 = default store id

echo $url;

Expected result


Actual result

Magento returns an URL prefixed with the admin path:



The following code:

$url = $this->_objectManager->get('Magento\Store\Model\StoreManagerInterface')

Works correctly:


This problem seems to be limited to the "getUrl" method.

This issue was not present with Magento 2.0.7.

@acharrex acharrex changed the title from [2.1] Unable get store URL from admin to [2.1] Unable to get store URL from admin Jun 28, 2016
@veloraven veloraven added the bug label Aug 1, 2016

I have the same issue on Magento 2.1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment