View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007112 | OXID eShop (all versions) | 5. ------ UpdateApp / Update ------ | public | 2020-04-04 19:41 | 2020-04-14 07:34 |
Reporter | leofonic | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 6.2.0 | ||||
Fixed in Version | 6.2.0 | ||||
Summary | 0007112: Module update from 6.1 doesn't work in Windows operating system | ||||
Description | Following these instructions: https://docs.oxid-esales.com/developer/en/6.2/update/index.html When using Windows operating system, command composer require --no-interaction oxid-esales/oxideshop-update-component throws an error: oxid-esales/oxideshop-composer-plugin: Updating component oxid-esales/oxideshop-update-component PHP Fatal error: Uncaught Error: Call to undefined method OxidEsales\OxidEshopUpdateComponent\Module\Command\InstallAllModulesConfigurationCommand::getDefaultName() in C:\web\www\myproject\vendor\symfony\console\DependencyInjection\AddConsoleCommandPass.php:61 | ||||
Additional Information | The error actually not blocks the update process. It could be ignored in QA tests. However user leofonic provided a fix the error won't occur anymore: See comment: https://bugs.oxid-esales.com/view.php?id=7112#c13173 [sp] | ||||
Tags | Components, Composer, error, Solution Provided, Update App | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
The issue is reproducable with the current version of the OXVM, while connected to the VM via SSH. Luckily it does not affect the update in a bad way. The error message appears, but the step does not fail actually. The following steps of the update manual can be done correctly without any further errors. The eShop gets updated and runs without any known issues after the update process. The error occurs on many systems, but not on all. Currently it's difficult to tell the exact circumstances, that lead to this error. We are taking more tests and try to collect further information. [sp] |
|
The error also occurs on our systems and we do not use windows as os, so this is not an os bug. With the error we cannot finalize the migration from 6.1.x to 6.2.y because the module settings has now to be yaml settings. In order to go on with the OXID version 6.2, this should be fixed. Here our complete stacktrace: PHP Fatal error: Uncaught Error: Call to undefined method OxidEsales\OxidEshopUpdateComponent\Module\Command\InstallAllModulesConfigurationCommand::getDefaultName() in /var/www/vhosts/oxid6.weber.digital/httpdocs_oxid_project_ce/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php:61 Stack trace: #0 /var/www/vhosts/oxid6.weber.digital/httpdocs_oxid_project_ce/vendor/symfony/dependency-injection/Compiler/Compiler.php(140): Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass->process(Object(Symfony\Component\DependencyInjection\ContainerBuilder)) #1 /var/www/vhosts/oxid6.weber.digital/httpdocs_oxid_project_ce/vendor/symfony/dependency-injection/ContainerBuilder.php(789): Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object(Symfony\Component\DependencyInjection\ContainerBuilder)) #2 /var/www/vhosts/oxid6.weber.digital/httpdocs_oxid_project_ce/vendor/oxid-esales/oxideshop-ce/source/Internal/Container/ContainerFactory.php(86): Symfony\Component\DependencyInject in /var/www/vhosts/oxid6.weber.digital/httpdocs_oxid_project_ce/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php on line 61 Btw, the error not occurs using --no-plugins and otherwise it occurs after "Generating OXID eShop unified namespace classes ... Done". |
|
This can be fixed by adding the commands to the services.yaml of the update component: services: _defaults: autowire: true public: false oxid_esales.oxid_eshop_update_component.command.install_all_modules_configuration_command: class: OxidEsales\OxidEshopUpdateComponent\Module\Command\InstallAllModulesConfigurationCommand tags: - { name: 'console.command', command: 'oe:oxideshop-update-component:install-all-modules' } OxidEsales\OxidEshopUpdateComponent\Module\Command\TransferModuleDataToProjectConfigurationCommand: class: OxidEsales\OxidEshopUpdateComponent\Module\Command\TransferModuleDataToProjectConfigurationCommand tags: - { name: 'console.command', command: 'oe:oxideshop-update-component:transfer-module-data' } OxidEsales\OxidEshopUpdateComponent\Module\Command\DeleteModuleDataFromDatabaseCommand: class: OxidEsales\OxidEshopUpdateComponent\Module\Command\DeleteModuleDataFromDatabaseCommand tags: - { name: 'console.command', command: 'oe:oxideshop-update-component:delete-module-data-from-database' } [...] |
|
@ox08152 As said before, the error don't block the update. The error is triggered in one step even while you can clearly verify, that InstallAllModulesConfigurationCommand::getDefaultName() method is present. In the next steps the function is used correctly and the module update can be done successfully. @leofonic thanks for your information. We will verify your suggestion. [sp] |
|
Extending the command configs in den service.yaml file of the module oxid-esales/oxideshop-update-component like @leofonic proposed solves the issue for us. |
|
I have also tested the suggested fix by @leofonic and can confirm it is working. Therefore I did a pull request. Thank you for that. [sp] |
|
We already released v1.0.1 of oxideshop-update-component with this fix, It should work. |
|
It's working now, thank you! |
|
I also get the Call to undefined method getDefaultName() error, but in the following situation: I have developed a module of the new module type "oxideshop-component", with which I can extend the "oe: console" with further commands. During the OXID install phase, in which all modules, themes and components are registered, my components repository is also instantiated at some point. After this registration, another module is installed, then the script aborts. In the error log I find that my first component command does not find the getDefaultName method. Since I cannot explain why the inherited (Symfony\Component\Console\Command\Command) method is not found, I have provided the getDefaultName method in my command as a workaround. So now there is no exception and the installation runs smoothly. I think the problem will occur again and again with the new module type "oxideshop-component". The solution to write the component name in the service.yaml, or to provide the getDefaultName method again in my variant, is not the solution to the problem, since both work against the specifications of the symfony-console-commands. |
|
Hello Mario, since this issue was especially focusing on the update process and the corresponding update component, I would recommend you create a new issue refering to the development of an oxideshop-component. [sp] |