View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006737 | OXID eShop (all versions) | 2.3. Extensions (modules, themes) | public | 2017-12-05 18:53 | 2018-01-23 11:33 |
Reporter | lins | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 6.0.0 | ||||
Fixed in Version | 6.0.1 | ||||
Summary | 0006737: Module with namespaces not working on Windows | ||||
Description | Modules which uses namespaces are currently not working on windows. | ||||
Steps To Reproduce | E.g. install "composer require linslin/oxid6-example-module:dev-master" on a Windows machine to reproduce this bug. [05 Dec 15:21:46.003093 2017] [exception] [type OxidEsales\Eshop\Core\Exception\SystemComponentException] [code 0] [file C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\UtilsObject.php] [line 222] [message EXCEPTION_SYSTEMCOMPONENT_CLASSNOTFOUND linslinexamplemodulemain] [05 Dec 15:21:46.003093 2017] [exception] [stacktrace] #0 C:\development\webroot\test-shop\app\source\oxfunctions.php(103): OxidEsales\EshopCommunity\Core\UtilsObject->oxNew(‘linslinexamplem…’) #1 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\ShopControl.php(372): oxNew(‘linslinexamplem…’) #2 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\ShopControl.php(272): OxidEsales\EshopCommunity\Core\ShopControl->_initializeViewObject(‘linslinexamplem…’, NULL, NULL, NULL) #3 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\ShopControl.php(137): OxidEsales\EshopCommunity\Core\ShopControl->_process(‘linslinexamplem…’, NULL, NULL, NULL) #4 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\Oxid.php(26): OxidEsales\EshopCommunity\Core\ShopControl->start() #5 C:\development\webroot\test-shop\app\source\index.php(15): OxidEsales\EshopCommunity\Core\Oxid::run() #6 C:\development\webroot\test-shop\app\source\admin\index.php(11): require_once(‘C:\development\…’) #7 {main} | ||||
Tags | Module, Namespaces, Solution Provided | ||||
Theme | All | ||||
Browser | All | ||||
PHP Version | 7.0 | ||||
Database Version | 5.6 | ||||
|
In \vendor\oxid-esales\oxideshop-ce\source\Core\Module\ModuleChainsGenerator.php, basename is used in order to get the class name of old style metadata. The problem is that on windows, basename accepts both slashes and backslashes as directory separator, on linux only slashes. So the namespaced classnames are treated as directory structures on windows. I did a quick hack to get modules running on windows, from line 238: if ($this->createClassExtension($parentClass, $extensionPath)) { //EDIT //namespaced if (strpos($extensionPath, '\\')){ $parentClass = $extensionPath; $lastClass = $extensionPath; } //old style else { $parentClass = basename($extensionPath); $lastClass = basename($extensionPath); } //END EDIT } |
|
Nice work! Are you guys going to release a hotfix version? |
|
@lins, we only publish hotfixes as kind of workarounds for critical bugs like security issues etc. Please take a look at this article (yes, has to be updated) for getting a clue about the main release policies: https://oxidforge.org/en/getting-started#toggle-id-4 |
|
@marco_steinhaeuser, thanks for your response. So I guess this bug will not be fixed in v6.0.1? |
|
PR: https://github.com/OXID-eSales/oxideshop_ce/pull/623 |
|
Hello guys, i have merged the pull request to b-6.x recently, so will come with the next release. |