TYPO3 Exception 1247602160

Tx_Extbase_Persistence_Storage_Exception_SqlError

Tables or Fields missing, database needs to be updated

#1247602160: Unknown column 'tx_yourext_domain_model_yourmodel.sorting' ...
Copied!

Make sure the Database tables are up to date. Go to the ExtensionManager and deactivate and activate the Extension or choose "Database Update" in the detail-view of an extension. Alternatively you can use the install-Tools "Database Analyser" to update all table definitions, choose "Update required tables COMPARE".

Model mapping incorrect or missing

--#1247602160: Table 'my_database.tx_extendpages_domain_model_page' doesn't exist:
SELECT tx_extendpages_domain_model_page.* FROM tx_extendpages_domain_model_page
WHERE tx_extendpages_domain_model_page.uid = '56' LIMIT 1
Copied!

can happen if you didn't map the table and model via TypoScript.

To solve this problem map the model to the corresponding database table name. The syntax for the upper example is the following:

plugin.tx_extendpages.persistence.classes.Tx_Extendpages_Domain_Model_Page.mapping.tableName = pages
Copied!

'tx_extbase_domain_model_backenduser' doesn't exist

--#1247602160: Table 'database.tx_extbase_domain_model_backenduser' doesn't exist:
SELECT tx_extbase_domain_model_backenduser.*
FROM tx_extbase_domain_model_backenduser
WHERE tx_extbase_domain_model_backenduser.uid = '1'
LIMIT 1
Copied!

See also: https://forge.typo3.org/issues/51234

Adding this code to the TypoScript, on all pages where is_siteroot is set, seems to solve this issue:

config.tx_extbase.persistence.classes {
    TYPO3\CMS\Beuser\Domain\Model\BackendUser {
        mapping {
            tableName = be_users
            columns {
                allowed_languages.mapOnProperty = allowedLanguages
                file_mountpoints.mapOnProperty = fileMountPoints
                db_mountpoints.mapOnProperty = dbMountPoints
                usergroup.mapOnProperty = backendUserGroups
            }
        }
    }
    TYPO3\CMS\Beuser\Domain\Model\BackendUserGroup {
        mapping {
            tableName = be_groups
            columns {
                subgroup.mapOnProperty = subGroups
            }
        }
    }
}
Copied!

'tx_staticinfotables_domain_model_language' doesn't exist

Oops, an error occurred!
Table '[DB_NAME.tx_staticinfotables_domain_model_language' doesn't exist.
More information regarding this error might be available online.
Copied!

No good solution found so far, will report in if solution is found.

Temporary solution would be to create table with 608 empty records, to be able to create and edit records in backend on page [0],

otherwise TYPO3 will display error message and you can not edit anything on page [0].

CREATE TABLE `tx_staticinfotables_domain_model_language` (
  `uid` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `constructed_language` varchar(255) DEFAULT NULL,
  `sacred_language` varchar(255) DEFAULT NULL,
  `iso_code_a2` varchar(5) DEFAULT NULL,
  `country_iso_code_a2` varchar(5) DEFAULT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Copied!

Try inserting the extbase mapping typoscript in the setup of your General Record Storage Page:

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:static_info_tables/Configuration/TypoScript/Extbase/setup.txt">
Copied!

'tx_srlanguagemenu_domain_model_systemlanguage' doesn't exist

This occurs when the sr_language_menu extension is installed, but not configured right.

Please make sure, that you include the "Language Menu Setup (sr_language_menu)" in

Templates->Edit the whole template record->Includes: Language Menu Setup (sr_language_menu)!

Secondly take a look a the static info tables extension and make sure that you have installed the infotables for all required languages!

'tx_news_domain_model_filereference' doesn't exist

See https://forge.typo3.org/issues/58925 and https://forge.typo3.org/issues/58784 I actually had the current version already (merging an upgraded dev instance with the live site), but I had to include the static templates and clear all caches, also truncate cf_ tables manually. Now it works.

MySQL max_allowed_packet

If only one Plugin/Site stops with "MySQL server has gone away" and all other are working..

Increase the MySQL max_allowed_packet value.

Powermail 2 formconverter: Unknown column 'fs.class' in 'field list'

Error encountered using formconverter after updating powermail from v1.4.x. Intermediate versions (1.6 to 2.0?) used to have field "class" in tables "tx_powermail_fieldsets" and "tx_powermail_fields". Add it manually to both tables, and formconverter will work (remove fields via DB COMPARE when done):

alter table tx_powermail_fieldsets add column class text NOT NULL;
alter table tx_powermail_fields add column class text NOT NULL;
Copied!

SQL Mode not compatible

In some cases the query is okay, but not compatible with the current sql_mode of the MySQL Database.

Check your sql_mode

mysql> SELECT @@sql_mode;
+-------------------------------------------------------------------------------------------------------------------------------------------+
| @@sql_mode                                                                                                                                |
+-------------------------------------------------------------------------------------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+-------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0,00 sec)
Copied!

Try to remove some of these modes in »/etc/mysql/my.conf«

> [mysqld]
> sql_mode=NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Copied!