OXID 6.0 - Module with namespaces not working on Windows

Has this been fixed in 6.1? Because I have 6.1 installed on my Windows machine which is running Apache/PHP on WAMP and it doesn’t work, I get the exact same error message when I navigate to my module menu entry, which should open a custom admin controller:

I’m using metadata 2.0 and autoloading via composer.

metadata.php: https://pastebin.com/RLSDtBEG

composer.json: https://pastebin.com/uGUTXcYR

error log:

[2019-07-12 10:57:40] OXID Logger.ERROR: EXCEPTION_SYSTEMCOMPONENT_CLASSNOTFOUND DeutschePost\Internetmarke\Controller\Admin\DPShop ["[object] (OxidEsales\\Eshop\\Core\\Exception\\SystemComponentException(code: 0): EXCEPTION_SYSTEMCOMPONENT_CLASSNOTFOUND DeutschePost\\Internetmarke\\Controller\\Admin\\DPShop at C:\\wamp64\\www\\oxid\\6.1\\vendor\\oxid-esales\\oxideshop-ce\\source\\Core\\UtilsObject.php:222)
#0 C:\\wamp64\\www\\oxid\\6.1\\source\\oxfunctions.php(101): OxidEsales\\EshopCommunity\\Core\\UtilsObject->oxNew('DeutschePost\\\\In...')
#1 C:\\wamp64\\www\\oxid\\6.1\\vendor\\oxid-esales\\oxideshop-ce\\source\\Core\\ShopControl.php(372): oxNew('DeutschePost\\\\In...')
#2 C:\\wamp64\\www\\oxid\\6.1\\vendor\\oxid-esales\\oxideshop-ce\\source\\Core\\ShopControl.php(272): OxidEsales\\EshopCommunity\\Core\\ShopControl->_initializeViewObject('DeutschePost\\\\In...', NULL, NULL, NULL)
#3 C:\\wamp64\\www\\oxid\\6.1\\vendor\\oxid-esales\\oxideshop-ce\\source\\Core\\ShopControl.php(137): OxidEsales\\EshopCommunity\\Core\\ShopControl->_process('DeutschePost\\\\In...', NULL, NULL, NULL)
#4 C:\\wamp64\\www\\oxid\\6.1\\vendor\\oxid-esales\\oxideshop-ce\\source\\Core\\Oxid.php(26): OxidEsales\\EshopCommunity\\Core\\ShopControl->start()
#5 C:\\wamp64\\www\\oxid\\6.1\\source\\index.php(15): OxidEsales\\EshopCommunity\\Core\\Oxid::run()
#6 C:\\wamp64\\www\\oxid\\6.1\\source\\admin\\index.php(11): require_once('C:\\\\wamp64\\\\www\\\\o...')
#7 {main}
"] []

EDIT: Added error log

And u installed the module with “composer req linslin/oxid6-example-module” ?

If not, composer dont know ur Module. A quick fix could be to add this Module paths to ur root composer.json like:

  "autoload": {
    "psr-4": {
      "linslin\\oxid6ExampleModule\\": "./source/modules/linslin/oxid6-example-module"

Edit: After that u need to run composer dumpautoload

Hello @Sioweb,

I have uploaded the wrong composer.json, I just fixed the link.

I have only run “composer update” inside the module itself (source/modules/dp/internetmarke). Do you mean that I need to require my module from the main oxid composer.json?

Jeh thats wrong.

Composer always works in the root /composer.json - not in any subdirectories.

U need to tell composer where ur module is, for this u have four methods:

First: u can install this module too: https://github.com/leofonic/oxid-autoregister-namespaces It tells composer where ur module is

Second: u can add the autoload-option from my last post to ur /composer.json

Third: U save ur Module at packagist.com and install it with composer req mo/dule

Fourth: U save ur Module localy - maybe at /privateSrc and write in ur /composer.json where it is

"repositories": [
        "type": "path",
        "url": "privateSrc/**/*"

Then install it with composer req mo/dule.


thanks a bunch, got it to work by adding it into the main composer.json. I was thinking that OXID somehow takes care of autoloading modules on its own.

I had some problems on Windows, if I didn’t use adminsitration rights on the command line.
The solution was to start the cmd or powershell with administration rights and you have to ensure, that the case in file names and metafile’s are the same.

True, composer has no rights to run some of its functions by default.

I prefer some better command line like Git Bash - it will also install MinGw which simulates most of LInux commands. So u dont need to use Windows syntaxes.