View Issue Details

IDProjectCategoryView StatusLast Update
0007181OXID eShop (all versions)5. ------ UpdateApp / Update ------public2020-10-07 12:58
Reportermario_lorenz Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
Status acknowledgedResolutionreopened 
Product Version6.2.2 
Summary0007181: oe-console command "oe:module:apply-configuration" could not process shop-id-option in CE/PE
DescriptionI will aply the the configuration only for one shop with id XX, as described here

https://docs.oxid-esales.com/developer/en/6.2/development/modules_components_themes/project/module_configuration/modules_configuration_deployment.html

If you try this in an OXID eShop Community or Professional Edition, you´ll got an error: The "--shop-id" option does not exist.
Steps To ReproduceUse an OXID eShop Community Edition or Professional Edition.
run on the console this command:

vendor/bin/oe-console oe:module:apply-configuration --shop-id=1
Additional InformationThe solution is: Add the missing parameter in the configure-method of
\Internal\Framework\Module\Command\ApplyModulesConfigurationCommand.php

    protected function configure()
    {
        $this->setDescription('Applies configuration for installed modules.')
           ->addOption(
                '--shop-id',
                '',
                InputOption::VALUE_OPTIONAL,
                'possible Shop-ID'
            );
    }

... together with the namespaced class in the top of the file:

use Symfony\Component\Console\Input\InputOption;

After this, the option exists for the command and the script works as aspected.
TagsSolution Provided
Attached Files
ThemeNot defined
BrowserNot defined
PHP Version7.4
Database VersionMySQL 5.7

Activities

Igor Iegupov

2020-10-06 11:08

reporter   ~0013317

Do you use CE or EE edition?

QA

2020-10-06 12:14

administrator   ~0013318

Hello Mario,

the parameter works fine in my EE environment. See attached screenshot of the console output. According to my result the issue is not reproducable in a standard installation.

[sp]
result.png (113,823 bytes)   
result.png (113,823 bytes)   

mario_lorenz

2020-10-07 10:21

developer   ~0013319

Ok, some more background.

I call this command in another command. I add in my call "--shop-id".

I test my plugin first in a CE-Shop, and then i´ve got the error.
I know, the shop-id is not necessary for a CE-Shop, an my solution can be: check if it is a CE Version, then call the command without option.
But i think, the command should not break with an error, if i add an optional and documented option.

QA

2020-10-07 12:50

administrator   ~0013321

Last edited: 2020-10-07 12:58

Thanks for the additional information. I tested in an OXID eShop Community Edition again and can confirm the behavior. I acknowledged the issue, but since the --shop-id parameter was only intended to be used with the Enterprise Edition I changed the severity to tweak. Your suggestion is understandable, but we will not consider it a bug, but an optimization. Your solution was also tested and I can confirm it as well. This will work as shown on the screenshot below.

A improvement to the documentation was suggested for now.

[sp]

newResult.png (120,260 bytes)   
newResult.png (120,260 bytes)