View Issue Details

IDProjectCategoryView StatusLast Update
0007392OXID eShop (all versions)2. ----- eShop backend (admin) -----public2022-12-19 18:45
Reporterd3 Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionunable to reproduce 
Product Version7.0.0-rc.2 
Summary0007392: empty navigation menu when using a Smarty-based theme
DescriptionWhen using a Smartythemes (e.g. Wave or Flow), some components in the shop have to be changed. After the swap, the "oxid_esales.templating.admin.navigation.file.locator" service changes to find the Menu.xml for the admin menu. In the case of an Enterprise Edition, no valid menu.xml can be found, the admin menu remains completely empty.

(DS)
Steps To Reproduce- use an OXID Shop PE or EE
- replace the RendererEngine. According to our (internal) package:
"require": {
    "oxid-esales/oxideshop-ce": { "^7.0",
    "oxid-esales/smarty-component": "*",
    "oxid-esales/smarty-admin-theme": "*"
  },
  "replace": {
    "oxid-esales/twig-component": "*",
    "oxid-esales/twig-component-pe": "*",
    "oxide-esales/twig-component-ee": "*",
    "oxid-esales/twig-admin-theme": "*"
  },
- delete the cache file for the admin menu
- reload the admin area
Additional InformationThe service for locating the menu.xml files in Twig:

    protected function getOxidEsales_Templating_Admin_Navigation_File_LocatorService()
    {
        return $this->services['oxid_esales.templating.admin.navigation.file.locator'] = new \OxidEsales\EshopCommunity\Internal\Framework\Templating\Locator\AdminNavigationFileLocator(new RewindableGenerator(function () {
            yield 0 => ($this->privates['OxidEsales\\EshopCommunity\\Internal\\Framework\\Templating\\Locator\\EditionUserFileLocator'] ?? $this->getEditionUserFileLocatorService());
            yield 1 => ($this->privates['OxidEsales\\TwigProfessional\\Templating\\DecoratingEditionMenuFileLocator'] ?? $this->getDecoratingEditionMenuFileLocatorService());
            yield 2 => ($this->privates['OxidEsales\\EshopCommunity\\Internal\\Framework\\Module\\Template\\Locator\\ModulesMenuFileLocator'] ?? $this->getModulesMenuFileLocatorService());
        }, 3));
    }

The service for locating the menu.xml files in Smarty:

    protected function getOxidEsales_Templating_Admin_Navigation_File_LocatorService()
    {
        return $this->services['oxid_esales.templating.admin.navigation.file.locator'] = new \OxidEsales\EshopCommunity\Internal\Framework\Templating\Locator\AdminNavigationFileLocator(new RewindableGenerator(function () {
            yield 0 => ($this->privates['OxidEsales\\EshopCommunity\\Internal\\Framework\\Templating\\Locator\\EditionUserFileLocator'] ?? $this->getEditionUserFileLocatorService());
            yield 1 => ($this->privates['OxidEsales\\EshopCommunity\\Internal\\Framework\\Templating\\Locator\\EditionMenuFileLocator'] ?? $this->getEditionMenuFileLocatorService());
            yield 2 => ($this->privates['OxidEsales\\EshopCommunity\\Internal\\Framework\\Module\\Template\\Locator\\ModulesMenuFileLocator'] ?? $this->getModulesMenuFileLocatorService());
        }, 3));
    }

The DecoratingEditionMenuFileLocatorService in Twig is apparently able to traverse the shop editions and find a matching match of the CE. In Smarty, the EditionMenuFileLocator is used instead, which does not have this capability. This searches mindlessly for a non-existent menu.xml in the EE_package under vendor.
TagsNo tags attached.
ThemeWave
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

QA

2022-12-19 11:37

administrator   ~0014965

Hey,

thank you for your report.

I couldn't reproduce it and I might have an idea why. To have all necessary packages, it's important to also require the smarty components for PE and EE:
    "require": {
        "oxid-esales/oxideshop-metapackage-ee": "7.0.0rc2",
        "oxid-esales/smarty-admin-theme": "dev-b-7.0.x",
        "oxid-esales/smarty-component": "dev-b-7.0.x",
        "oxid-esales/smarty-component-pe": "dev-b-7.0.x",
        "oxid-esales/smarty-component-ee": "dev-b-7.0.x",
        "oxid-esales/wave-theme": "dev-b-7.0.x"
    },


By this, the method getOxidEsales_Templating_Admin_Navigation_File_LocatorService has a different body as your example:
    protected function getOxidEsales_Templating_Admin_Navigation_File_LocatorService()
    {
        return $this->services['oxid_esales.templating.admin.navigation.file.locator'] = new \OxidEsales\EshopCommunity\Internal\Framework\Templating\Locator\AdminNavigationFileLocator(new RewindableGenerator(function () {
            yield 0 => ($this->privates['OxidEsales\\EshopCommunity\\Internal\\Framework\\Templating\\Locator\\EditionUserFileLocator'] ?? $this->getEditionUserFileLocatorService());
            yield 1 => ($this->privates['OxidEsales\\SmartyProfessional\\Templating\\EditionMenuFileLocator'] ?? $this->getEditionMenuFileLocator3Service());
            yield 2 => ($this->privates['OxidEsales\\EshopCommunity\\Internal\\Framework\\Templating\\Locator\\EditionMenuFileLocator'] ?? $this->getEditionMenuFileLocatorService());
            yield 3 => ($this->privates['OxidEsales\\SmartyEnterprise\\Templating\\EditionMenuFileLocator'] ?? $this->getEditionMenuFileLocator2Service());
            yield 4 => ($this->privates['OxidEsales\\EshopCommunity\\Internal\\Framework\\Module\\Template\\Locator\\ModulesMenuFileLocator'] ?? $this->getModulesMenuFileLocatorService());
        }, 5));
    }


To get those packages you can use the Github repository as a source:
composer config repositories.smarty-component-pe vcs https://github.com/OXID-eSales/smarty-component-pe
composer config repositories.smarty-component-ee vcs https://github.com/OXID-eSales/smarty-component-ee


Greetings,
Michael

-MK

QA

2022-12-19 18:45

administrator   ~0014967

-MK