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

…to be properly mapped in the the inheritance hierarchy #828

Open MP- opened 8 months ago

MP- commented 8 months ago

IMG_1630 “ 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.”

When upgrading Concrete CMS from 9.2.3 to 9.2.3 (in order to update to 9.2.4, next), this error displayed. Please assist.

Environment & details:

Version | "9.2.3" -- | -- Installed Version | "9.2.3" Database Version | "20231002142400"
Version | "8.1.26" -- | -- Extensions | array:60 [▶]
Mesuva commented 8 months ago

This recurring issue has been hard to track down (but I believe there's a fix in another branch, something I've not had the chance to merge).

But one possible solution is to clear the doctrine cache, via the red button on /index.php/dashboard/system/environment/entities

Perhaps try hitting that prior to your upgrade, and leaving Doctrine Development Mode on for it.

MP- commented 8 months ago

I appreciate your prompt and insightful reply. That’s helpful information for people who have yet to update, but how do I get there from a CPanel or a MyPHPAdmin perspective? Any suggestions for a post upgrade environment?

The following image is that of what shows when attempting to go to /index.php/dashboard/system/environment/entities

IMG_1632

I thought about running the 9.2.4 update via Softaculous but it currently only shows 9.2.2. Perhaps I should reinstall that, but I am concerned about my content since the backup that I had ran is nowhere that I have looked.

Mesuva commented 8 months ago

Clearing the doctrine cache is something you do from within Concrete, not something from cPanel

So you'd try to get to /index.php/dashboard/system/environment/entities on your website. Sometimes you can get to that page even if the doctrine entities are broken.

But at this point, you might be better off just resetting the install, since it can be quite difficult to get things running again from this point.

If you are running cPanel, normally that is set up with some sort of backup/restore option, one where the server itself takes the backup. Your hosting might be able to assist.

MP- commented 8 months ago

By the way, the image in my previous post is from an attempt at displaying https://earn-n-save.com/index.php/dashboard/system/environment/entities. Surely, there’s got to be a better solution than washing away all of my content. So, I hope that when you mentioned resetting Concrete CMS, that this (hopefully) is not what you meant. If there is a “red button” to press then there is a targeted process which achieves via code what should be manually achievable. BlackBerry’s Jarvis scans millions of lines of code to prevent typos, bugs, and vulnerabilities for over 215 million vehicles, and I am sure that there are some safeguards in place for rerunning the update or for reverting back to the version which was already in place—such as a dry run in virtual environment which would copy the old environment (including themes and add-ons) to a backup before just going “Whoops!/Opps!/Error/Bug/Contact support.” You did say that the web host could try to locate a/the backup to restore my website. Thanks for your quick responses. You put thought into what you said that has stemmed from deep study and analysis of Concrete CMS, and as I learn, I hope to help others, too. Thanks, and more clarification and suggestions are still welcome and needed.

Mesuva commented 7 months ago

I certainly wasn't suggesting resetting content, more that you just might need to rollback the files and database to a 'known good state'. And that's where cPanel often has a feature to be able to do that.