Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying module config leads to error #39

Open
thomas-seyfarth opened this issue Nov 13, 2024 · 0 comments
Open

Deploying module config leads to error #39

thomas-seyfarth opened this issue Nov 13, 2024 · 0 comments

Comments

@thomas-seyfarth
Copy link

thomas-seyfarth commented Nov 13, 2024

While execuing vendor/bin/oe-console oe:module:deploy for more than the first time, the oxid process throws an exception:

Activating molliepayment
An exception occurred: OxidEsales\EshopCommunity\Internal\Framework\Module\Setup\Exception\ControllersDuplicationModuleConfigurationException Controller namespace duplication: Mollie\Payment\Application\Controller\MollieWebhook

This is caused by vendor/oxid-esales/oxideshop-ce/source/Internal/Framework/Module/Setup/Validator/ControllersValidator.php
It always check against a lower case controller name, but adds it "as is" to the config. That way, after the module config was deployed the first time, there will be a Controller with
'MollieWebhook' =>Mollie\Payment\Application\Controller\MollieWebhook::class in the config, it check against molliewebhook which is not present, and afterwards tries to add the namespace Mollie\Payment\Application\Controller\MollieWebhook to the config, which is already present and fails.

This causes the activation of the mollie module to fail, which then causes that the Events and therefor all SQLs inside cant run. Since OXID will also convert frontend-calls to controllers to lowercase, there is no benefit in having them in camelCase in the metadata.


My suggestion would be to change all controller configurations in the metatdata to lowercase like

    'controllers'   => [
        'molliewebhook' => Mollie\Payment\Application\Controller\MollieWebhook::class,
        'mollieapplepay' => Mollie\Payment\Application\Controller\MollieApplePay::class,
        'molliepaypalexpress' => Mollie\Payment\Application\Controller\MolliePayPalExpress::class,
        'molliefinishpayment' => Mollie\Payment\Application\Controller\MollieFinishPayment::class,
        'mollie_order_refund' => Mollie\Payment\Application\Controller\Admin\OrderRefund::class,
        'mollie_apilog' => Mollie\Payment\Application\Controller\Admin\ApiLog::class,
        'mollie_apilog_main' => Mollie\Payment\Application\Controller\Admin\ApiLogMain::class,
        'mollie_apilog_list' => Mollie\Payment\Application\Controller\Admin\ApiLogList::class,
        'mollie_order_capture' => Mollie\Payment\Application\Controller\Admin\OrderCapture::class,
        'molliecron' => Mollie\Payment\Application\Controller\MollieCron::class,
    ],

Tested on OXID 7.1 & PHP 8.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant