Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Uninstall #806

Open
BloodyIron opened this issue Aug 23, 2023 · 7 comments
Open

Can't Uninstall #806

BloodyIron opened this issue Aug 23, 2023 · 7 comments

Comments

@BloodyIron
Copy link

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
Copy link
Author

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
Copy link
Collaborator

Mesuva commented Aug 23, 2023

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
Copy link
Author

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
Copy link
Author

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

@BloodyIron
Copy link
Author

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
Copy link
Collaborator

Mesuva commented Aug 23, 2023

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:

  • the Refresh Entities button tells Concrete to re-review all the doctrine entities across add-ons
  • the development mode means that Concrete will not cache that information, it will keep checking to see if Doctrine entities need to make database changes.

@BloodyIron
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants