View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007181 | OXID eShop (all versions) | 5. ------ UpdateApp / Update ------ | public | 2020-10-06 10:58 | 2024-07-24 10:51 |
Reporter | mario_lorenz | Assigned To | |||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 6.2.2 | ||||
Summary | 0007181: oe-console command "oe:module:apply-configuration" could not process shop-id-option in CE/PE | ||||
Description | I 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 Reproduce | Use 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 Information | The 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. | ||||
Tags | Solution Provided | ||||
Attached Files | |||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | 7.4 | ||||
Database Version | MySQL 5.7 | ||||
|
Do you use CE or EE edition? |
|
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] |
|
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. |
|
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] |
|
This won't be changed for 2 reasons: From the documentation: "To apply configuration use the following command: vendor/bin/oe-console oe:module:apply-configuration Provide --shop-id option if you are using an OXID eShop Enterprise Edition and it is only for one shop. vendor/bin/oe-console oe:module:apply-configuration --shop-id=1" It is clearly stated that you should only use the option in an Enterprise Edition. Second reason: This command is no longer used in OXID >=7 |