View Issue Details

IDProjectCategoryView StatusLast Update
0007124OXID eShop (all versions)6. ------ Setup -------public2024-10-09 15:20
Reporterleofonic Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version6.2.0 
Summary0007124: Module with error in metadata cannot be removed
DescriptionIf you try to install a module that has an incorrect metadata, installation fails, but deinstallation is not possible.
Steps To Reproduce1. execute: composer require linslin/oxid6-example-module
    Installation fails, composer.json is reverted
   At this point, the module has already been downloaded by composer
2. execute: composer update
   Update also fails, although module is no longer present in composer.json:
  [OxidEsales\EshopCommunity\Internal\Framework\Module\MetaData\Exception\UnsupportedMetaDataKeyException]
  The metadata key "files" is not supported in metadata version "2.0".
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

QA

2020-04-20 09:10

administrator   ~0013189

Hi leofonic,

in my reproduction process with version 6.2 I can verify that the installation fails, also the composer update, but in my system, he doesn't remove the failed module entries in composer - data.
could you please check, if in the composer.json and composer.lock the module entries still exist?

I removed the entries in composer.json, composer.lock and vendor/composer/installed.json, then composer update worked.

Best Regards

leofonic

2020-04-20 11:04

reporter   ~0013191

> could you please check, if in the composer.json and composer.lock the module entries still exist?

composer.json: no entry, it was reverted after installation failed. Composer.lock is not read by composer update i think.

I think it should not be necessary to manually remove the module from vendor/composer/installed.json, errors in metadata could be ignored by oxid compooser plugin on deinstallation.

SvenBrunk

2024-07-03 14:23

administrator   ~0017192

@leofonic: I didn't see any error when installing the module, but I saw an error when trying to remove the module again.
composer remove --no-plugins linslin/oxid6-example-module
fixed that

SvenBrunk

2024-10-09 15:19

administrator   ~0017624

Last edited: 2024-10-09 15:20

@leofonic There is no change needed here. The reason why our composer plugin requires the module to still exist, is, that there might be things to do on de-installation. In case you know for sure that no such things are necessary, you can use the --no-plugins option I mentioned, but we strongly advise against removing the module source before cleanly deactivating and uninstalling the module.