concretecms-community-store / community_store

An open, free and community developed eCommerce system for Concrete CMS
https://concretecms-community-store.github.io/community_store/
MIT License
106 stars 66 forks source link

Can't Uninstall #806

Open BloodyIron opened 11 months ago

BloodyIron commented 11 months ago

When I try to go to the "Details" page for Community Store (v2.6.0) I get this debug error spat out:

The discriminator value "storeorderkey" is invalid. It must be one of "key", "expresskey", "pagekey", "userkey", "legacykey", "sitetypekey", "filekey", "sitekey", "eventkey".

When I try to uninstall it via the CLI with:

./concrete/bin/concrete5 c5:package-uninstall community_store

I get this error:

In MappingException.php line 679:

Entity 'Concrete\Package\CommunityStore\Entity\Attribute\Key\StoreOrderKey' has to be part of the discriminator map of 'Concrete\Core\Entity\Attribute\Key\Key' to be properly mapped in the inheritan
ce hierarchy. Alternatively you can make 'Concrete\Package\CommunityStore\Entity\Attribute\Key\StoreOrderKey' an abstract class to avoid this exception from occurring.

This is a dev environment running Concrete CMS v8.5.7, I'm trying to uninstall Community Store as when I'm working on some pages I get errors thrown that seem related to Community Store.

What exactly can I do here? :( I installed it many weeks ago, so I can't exactly roll back for backups...

BloodyIron commented 11 months ago

Oh and the first file the debug refers to is:

Doctrine\ORM\Internal\Hydration\HydrationException …/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/HydrationException.php100

/var/www/c5-scratch/updates/concrete5-8.5.7/concrete/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/HydrationException.php

Mesuva commented 11 months ago

Have you tried running the Refresh Entities option via /index.php/dashboard/system/environment/entities? I'd try running it twice, as well as then clearing the cache

BloodyIron commented 11 months ago

I had not heard of this section of the Dashboard before, and am not familiar with what it does. Went there, hit Refresh Entities, and this error was spat out:

Entity 'Concrete\Package\CommunityStore\Entity\Attribute\Key\StoreProductKey' has to be part of the discriminator map of 'Concrete\Core\Entity\Attribute\Key\Key' to be properly mapped in the inheritance hierarchy. Alternatively you can make 'Concrete\Package\CommunityStore\Entity\Attribute\Key\StoreProductKey' an abstract class to avoid this exception from occurring.

Doctrine\ORM\Mapping\MappingException …/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.php679

/var/www/c5-scratch/updates/concrete5-8.5.7/concrete/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.php

BloodyIron commented 11 months ago

Also I have Doctrine Development Mode set to Off, what does turning it On do? I'm really not familiar with this area.

BloodyIron commented 11 months ago

I just ran "Refresh Entities" twice (going back a page when given the error) then cleared cache, then tried to go to "Details" for the Community Store addon, and same error in original post comes up (descriminator value...)

: s

Mesuva commented 11 months ago

Try turning on the development mode. It's a safe thing to do.

Very briefly - the way that much of Concrete works is that the database tables are defined within certain files that are considered 'Doctrine entities'. Concrete will read those files and determine if it needs to create or update the database tables accordingly to match. Concrete/Doctrine will also create some files that help to describe those database entities.

So:

BloodyIron commented 11 months ago

Turning on "Doctrine Development Mode", then going to "Details" for the Community Store addon, produces this error output:

Doctrine \ ORM \ Internal \ Hydration \ HydrationException The discriminator value "storeorderkey" is invalid. It must be one of "key", "expresskey", "pagekey", "userkey", "legacykey", "sitetypekey", "filekey", "sitekey", "eventkey".

Doctrine\ORM\Internal\Hydration\HydrationException …/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/HydrationException.php100

/var/www/c5-scratch/updates/concrete5-8.5.7/concrete/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/HydrationException.php