Unexpected error

Permalink
Hello, today I had to fix something on the site of one of my clients but when I entered the login credentials and clicked on login, I do not load the backend and I receive the following message:

There was an unexpected error.
Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'Sql905012_2.ConfigStore' doesn't exist' in /web/htdocs/www.solarcostruzioni.it/home/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:91 Stack trace: #0 /web/htdocs/www.solarcostruzioni.it/home/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(91): PDOStatement->execute(Array) #1 /web/htdocs/www.solarcostruzioni.it/home/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(830): Doctrine\DBAL\Driver\PDOStatement->execute(Array) #2 /web/htdocs/www.solarcostruzioni.it/home/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(541): Doctrine\DBAL\Connection->executeQuery('select cfValue ...', Array, Array) #3 /web/htdocs/www.solarcostruzioni.it/home/concrete/src/Database/Connection/Connection.php(114): Doctrine\DBAL\Connection->fetchColumn('select cfValue ...', Array, 0) #4 /web/htdocs/www.solarcostruzioni.it/home/concrete/src/User/User.php(693):

Can someone help me please? Thank you.

wells
 
wells replied on at Permalink Reply
wells
HELP ME, PLEASE!
hutman replied on at Permalink Reply
hutman
Does the database "Sql905012_2" exist?
Does the table "ConfigStore" exist within that database?

Both of these are case sensitive.
wells replied on at Permalink Reply
wells
The database exists!
I have never installed "Store" on this site.
wells replied on at Permalink Reply
wells
A few days before I deleted the Sql905012_5 database with the "store" installed. I do not think there is relevance but I wanted to let you know.
hutman replied on at Permalink Reply
hutman
Yes, it clearly is relevant. I would say that's what broke the site. Somewhere in your site you have references to that store.

Did you delete all of the files and directories from /application/files/cache?
wells replied on at Permalink Reply
wells
No
wells replied on at Permalink Reply
wells
I have the copy of the deleted database.
hutman replied on at Permalink Reply
hutman
Delete everything in that cache folder and see if the error goes away. You don't need anything in that folder.
wells replied on at Permalink Reply
wells
Thanks, I'll try tomorrow (at least for me, in Italy now only 12:00). I will let you know.
wells replied on at Permalink Reply
wells
24:00 sorry
wells replied on at Permalink Reply
wells
The database exist!
I have never installed "Store" on this site.
katalysis replied on at Permalink Reply
katalysis
@hutman is asking if the table ConfigStore is in the database (it's a table in the usual concrete5 database nothing to do with a separate store application).

The error suggests it is missing.
wells replied on at Permalink Reply
wells
I tried to delete all files and directories from / application / files / cache.
I tried to load the Sql905012_5 database, which I had deleted.
The result does not change.
wells replied on at Permalink Reply
wells
There is no "Store" folder in the Packages folder because I've never installed any stores on this site.
katalysis replied on at Permalink Reply
katalysis
OK, I understand that.

The error says you are missing a table in the concrete5 database. It's not a file or folder and it is related to the main concrete5 install and not to any additional application. The table is called 'configStore' and every concrete5 installation should have it.

Do you have access to your database through your hosting account and are you able to look at it to check?
wells replied on at Permalink Reply
wells
Yes, I have access to the database.
You can drive me, I do not understand much about databases, just the necessary.
Thank you.
katalysis replied on at Permalink Reply
katalysis
In the list of tables do you have one called 'configStore'?
wells replied on at Permalink Reply
wells
No table called "configStore"
wells replied on at Permalink Reply
wells
Concrete5 version "5.7.5.9"
katalysis replied on at Permalink Reply
katalysis
This is the structure of the missing table:

<table name="ConfigStore">
    <field name="cfKey" type="string" size="64">
      <key/>
    </field>
    <field name="timestamp" type="timestamp">
      <deftimestamp/>
      <notnull/>
    </field>
    <field name="cfValue" type="text"/>
    <field name="uID" type="integer" size="10">
      <unsigned/>
      <key/>
      <default value="0"/>
    </field>
    <field name="pkgID" type="integer" size="10">


I'd be tempted to backup the site and database and then manually add the table to get past the error.

There may well be further errors though if the table was missed out in a previously failed upgrade.

BACKUP THE SITE & DATABASE FIRST.
wells replied on at Permalink Reply
wells
How do I add the table you sent me?
katalysis replied on at Permalink Reply
katalysis
Try running these two sql statements

CREATE TABLE `ConfigStore` (
  `cfKey` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
  `cfValue` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `uID` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `pkgID` int(10) UNSIGNED NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


ALTER TABLE `ConfigStore`
  ADD PRIMARY KEY (`cfKey`,`uID`),
  ADD KEY `uID` (`uID`,`cfKey`),
  ADD KEY `pkgID` (`pkgID`,`cfKey`);


Again, BACKUP YOIUR DATABASE FIRST
wells replied on at Permalink Reply
wells
Ok, it works. Do I have to keep the "ConfigStore" table even if I have never installed a store?
Thank you very much for helping.
mlocati replied on at Permalink Reply
mlocati
It's not a table related to stores, this table stores some configuration...
katalysis replied on at Permalink Reply
katalysis
Excellent news.

Yes keep it, it has nothing to do with any store, concrete5 uses it to store some config settings. It is part of concrete5.