Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
S sg_cookie_optin
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 17
    • Issues 17
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • TYPO3
  • sg_cookie_optin
  • Issues
  • #147

Closed
Open
Created Feb 03, 2021 by Entwickler p2 media@entwickler-p2media

SQL-Errors on new records and translations

We use EXT:sg_cookie_optin in different TYPO3 projects with different server environments. After TYPO3 Upgrades and extension updates, we get the following situation:

Version 3.2.8
SQL error: 'Incorrect integer value: '' for column typo3_database.tx_sgcookieoptin_domain_model_cookie.parent_optin at row 1' (tx_sgcookieoptin_domain_model_cookie:NEW601a8a442d7ab984951541)
SQL error: 'Incorrect integer value: '' for column typo3_database.tx_sgcookieoptin_domain_model_script.parent_optin at row 1' (tx_sgcookieoptin_domain_model_cookie:NEW601a8a442d7ab984951541)
The same is for field "parent_group".

We tested it with:

  • TYPO3 9.5.23/.24
  • php 7.2
  • MariaDB 10.2/.3
  • With Strict-Mode and without any SQL-Mode of MariaDB

Solution
Set default value via TCA of field parent_group and parent_optin in table tx_sgcookieoptin_domain_model_cookie and tx_sgcookieoptin_domain_model_script.
$GLOBALS[TCA][tx_sgcookieoptin_domain_model_cookie]['columns'][parent_optin][config][default] = 0
$GLOBALS[TCA][tx_sgcookieoptin_domain_model_cookie]['columns'][parent_group][config][default] = 0
$GLOBALS[TCA][tx_sgcookieoptin_domain_model_script]['columns'][parent_optin][config][default] = 0
$GLOBALS[TCA][tx_sgcookieoptin_domain_model_script]['columns'][parent_group][config][default] = 0

Please set this config to prevent this error. Their are many changes since TYPO3 9.5.16 in combination with MariaDB. MariaDB needs values. We set in our extensions every time a default value if necessary and set in ext_tables.sql as well.

@see: #145 (closed)

Edited Feb 03, 2021 by Entwickler p2 media
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking