Hi @musicmaster.
I'm now having serious trouble with my shop prestashop 8.1.1.
I have the table ps_shop_url with 4 shops with different virtual_uri setted.
In the standard ps_mainmenu module (just as an example) the from creation create an action link:
line 1114 $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) .
'&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
This call classes/Link ->getAdminBaseLink()
line 938 return $base.$shop->getBaseURI();
in the classes/shop/Shop class the function is defined in this way
public function getBaseURI()
{
return $this->physical_uri . $this->virtual_uri;
}
which, of course, contains virtual_uri. BUT it should not contain it for admin links (correct??).
I'm experimenting this modifcation of the main classes/Link line 911
public function getAdminBaseLink($idShop = null, $ssl = null, $relativeProtocol = false)
{
if (null === $ssl) {
$ssl = Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE');
}
if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE')) {
if (null === $idShop) {
$idShop = $this->getMatchingUrlShopId();
}
//Use the matching shop if present, or fallback on the default one
if (null !== $idShop) {
$shop = new Shop($idShop);
} else {
$shop = new Shop((int) Configuration::get('PS_SHOP_DEFAULT'));
}
} else {
$shop = Context::getContext()->shop;
}
if ($relativeProtocol) {
$base = '//' . ($ssl && $this->ssl_enable ? $shop->domain_ssl : $shop->domain);
} else {
$base = (($ssl && $this->ssl_enable) ? 'https://' . $shop->domain_ssl : 'http://' . $shop->domain);
}
return $base.'/'; //REMOVED: . $shop->getBaseURI();
}
So far it's working.