Bug #84219

Uncaught exception in DataHandler::postProcessDatabaseInsert()

Added by Andrej K over 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-03-12
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Description

Unable to manage/add/modify new pages due to uncaught exception while accessing MS SQL Server database.

Prerequisites

Environment is set up in following way:

  • TYPO3 version: 9.1.0
  • Webserver: Microsoft-IIS/10.0
  • PHP version: 7.2.3
  • Database: MS SQL Server 12.0.2000.8
  • OS: Windows 10

Test

1) Install TYPO3 using environment above
2) Login to backend
3) Create new empty page and save it

Results

After these steps I receive following error:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: Return value of TYPO3\CMS\Core\DataHandling\DataHandler::postProcessDatabaseInsert() must be of the type integer, string returned | TypeError thrown in file C:\inetpub\wwwroot\typo3\sysext\core\Classes\DataHandling\DataHandler.php in line 9124. Requested URL: http://localhost/typo3/index.php?route=%%2Frecord%%2Fedit&token=244dd0f4bd0acbab3d7ae01821f08c29f3c1cc8c&edit[tt_content][3]=new&defVals[tt_content][colPos]=0&defVals[tt_content][sys_language_uid]=0&defVals[tt_content][CType]=bullets&returnUrl=%%2Ftypo3%%2Findex.php%%3Froute%%3D%%252Fweb%%252Flayout%%252F%%26token%%3Db7999abfae4f530fd8b05f30ddb28eb54f06d840%%26id%%3D3%%26 

I have also this similar error in error log:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: Return value of TYPO3\CMS\Core\DataHandling\DataHandler::postProcessDatabaseInsert() must be of the type integer, string returned | TypeError thrown in file C:\inetpub\wwwroot\typo3\sysext\core\Classes\DataHandling\DataHandler.php in line 9124. Requested URL: http://localhost/typo3/index.php?route=%%2Fajax%%2Frecord%%2Fprocess&token=24719e5e66f374f01457e7fd20ec1414ed3caefc 

Due to these DB processing errors I can't create new content on TYPO3.


Related issues

Related to TYPO3 Core - Bug #84236: Uncaught exception in DataHandler Closed 2018-03-13

Associated revisions

Revision 7603c0f2 (diff)
Added by Susanne Moog over 1 year ago

[BUGFIX] Cast return value of postProcessDatabaseInsert to integer

Connection::lastInsertId returns a string but
DataHandler::postProcessDatabaseInsert has a strict integer return
value, so the value has to be casted to integer on return.

Additionally, when using sqlserver doctrine fails to fetch the last
inserted id under certain circumstances. An additional retrieval
method was introduced to mitigate that error.

Resolves: #84219
Releases: master, 8.7
Change-Id: I94dc0dc964aef26380703f641691c6a80ec5180d
Reviewed-on: https://review.typo3.org/56118
Reviewed-by: Frank Naegler <>
Tested-by: Frank Naegler <>
Tested-by: TYPO3com <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision 733a4087 (diff)
Added by Susanne Moog over 1 year ago

[BUGFIX] Cast return value of postProcessDatabaseInsert to integer

Connection::lastInsertId returns a string but
DataHandler::postProcessDatabaseInsert has a strict integer return
value, so the value has to be casted to integer on return.

Additionally, when using sqlserver doctrine fails to fetch the last
inserted id under certain circumstances. An additional retrieval
method was introduced to mitigate that error.

Resolves: #84219
Releases: master, 8.7
Change-Id: I94dc0dc964aef26380703f641691c6a80ec5180d
Reviewed-on: https://review.typo3.org/56195
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56118

#2 Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56118

#3 Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56118

#4 Updated by Andrej K over 1 year ago

  • Related to Bug #84236: Uncaught exception in DataHandler added

#5 Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56195

#6 Updated by Susanne Moog over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#7 Updated by Benni Mack 10 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF