Project

General

Profile

Actions

Bug #84236

closed

Uncaught exception in DataHandler

Added by Andrej K about 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2018-03-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
exception_handling
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
  • TYPO3 was installed using composer (typo3/cms)
  • Microsoft Drivers for PHP for SQL Server (php_sqlsrv.dll) version 5.2.0-RC from here:

https://github.com/Microsoft/msphpsql/releases

Test

1) Install TYPO3 using environment above

2) Apply patchset from https://review.typo3.org/#/c/56118/

2) Login to backend

3) Create new empty page and save it

Results

After these steps I receive following error:



Oops, an error occurred!

Argument 3 passed to TYPO3\CMS\Core\History\RecordHistoryStore::addRecord() must be of the type array, null given, called in C:\inetpub\wwwroot\typo3\sysext\core\Classes\DataHandling\DataHandler.php on line 7185 

And I have this in error log:



Core: Exception handler (WEB): Uncaught TYPO3 Exception: Argument 3 passed to TYPO3\CMS\Core\History\RecordHistoryStore::addRecord() must be of the type array, null given, called in C:\inetpub\wwwroot\typo3\sysext\core\Classes\DataHandling\DataHandler.php on line 7185 | TypeError thrown in file C:\inetpub\wwwroot\typo3\sysext\core\Classes\History\RecordHistoryStore.php in line 70. Requested URL: http://localhost/typo3/index.php?route=%%2Fajax%%2Frecord%%2Fprocess&token=e144167bd3bf0aa66ae3910e10253fb9296af95d

I have applied patchset from https://review.typo3.org/#/c/56118/ but there is now this error while processing data on MS SQL Server database.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #84219: Uncaught exception in DataHandler::postProcessDatabaseInsert()Closed2018-03-12

Actions
Related to TYPO3 Core - Bug #83994: $uid must be positive integer, 0 given when creating a new PageClosed2018-02-21

Actions
Related to TYPO3 Core - Bug #87750: Argument 3 passed to TYPO3\CMS\Core\DataHandling\History\RecordHistoryStore::addRecord() must be of the type arrayClosed2019-02-20

Actions
Actions #1

Updated by Georg Ringer about 6 years ago

I guess the method checkStoredRecord() fails and this returns then null. I am not so sure if changing the line
$newRow = $this->checkStoredRecord($table, $id, $fieldArray, 1);
to
$newRow =(array) $this->checkStoredRecord($table, $id, $fieldArray, 1);

is the proper solution?

Actions #2

Updated by Andrej K about 6 years ago

Thanks a lot, this seems to fix the uncaught exception as described above.

I could create new pages now without problem.

However, whenever I try to add new content element on newly created page I receive following error:

Oops, an error occurred!

$uid must be positive integer, 0 given 
More information regarding this error might be available online (https://wiki.typo3.org/Exception/CMS/1437656456).

This is in error log:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1437656456: $uid must be positive integer, 0 given | InvalidArgumentException thrown in file C:\inetpub\wwwroot\typo3\sysext\backend\Classes\Form\FormDataProvider\AbstractDatabaseRecordProvider.php in line 44. Requested URL: http://localhost/typo3/index.php?route=%%2Frecord%%2Fedit&token=a98a7395a75b4173d2e6ba88b268c8967c4f291d&edit[tt_content][3]=new&defVals[tt_content][colPos]=0&defVals[tt_content][sys_language_uid]=0&defVals[tt_content][CType]=header&returnUrl=%%2Ftypo3%%2Findex.php%%3Froute%%3D%%252Fweb%%252Flayout%%252F%%26token%%3D3f1624671e215145d02e8701a92c40f517bf50f8%%26id%%3D3 

There seems to already exist bug for this: https://forge.typo3.org/issues/83994

Is there any way to fix this? I have reinstalled typo3 after applying patches that fix uncaught exceptions and the $uid issue persists.

Actions #3

Updated by Andrej K about 6 years ago

After applying patchset 3 from https://review.typo3.org/#/c/56118/ the "$uid must be positive integer, 0 given" issue was fixed.

However, there are errors while processing queries on Microsoft SQL Server. The bug is described here: https://forge.typo3.org/issues/84303

Actions #4

Updated by Andrej K about 6 years ago

  • Related to Bug #84219: Uncaught exception in DataHandler::postProcessDatabaseInsert() added
Actions #5

Updated by Riccardo De Contardi about 6 years ago

  • Category set to DataHandler aka TCEmain
Actions #6

Updated by Riccardo De Contardi about 6 years ago

  • Related to Bug #83994: $uid must be positive integer, 0 given when creating a new Page added
Actions #7

Updated by Riccardo De Contardi over 5 years ago

  • Status changed from New to Needs Feedback

Is there something still missing here?

As far as I can see https://review.typo3.org/#/c/56118/ has been merged and #84303 has been marked as resolved, too .

Actions #8

Updated by Sybille Peters over 5 years ago

  • Tags set to exception_handling
Actions #9

Updated by Wouter Wolters over 5 years ago

  • Status changed from Needs Feedback to Closed

Both mentioned issues are marked as resolved and the reporter did not respond the last 4 months on the questions asked. Closing this one.

Actions #10

Updated by Tymoteusz Motylewski about 4 years ago

  • Related to Bug #87750: Argument 3 passed to TYPO3\CMS\Core\DataHandling\History\RecordHistoryStore::addRecord() must be of the type array added
Actions

Also available in: Atom PDF