Project

General

Profile

Actions

Bug #47816

closed

TER update error

Added by Markus Klein over 11 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-05-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

(The following issue was reported by Markus Kappe on the User Group Austria Mailing list.)

Under certain conditions the TER update spinner does never stop.
(This has been reported before in #43539, but has been closed due to non-reproducibility.)

Inspecting the AJAX call reveals a
Fatal error: Maximum execution time of 30 seconds exceeded in /xxx/typo3_src-6.0.4/typo3/sysext/core/Classes/Charset/CharsetConverter.php on line 2090

This points to a wrong error handling and the user does not get any feedback.

The error
I found out that a query fails. (Insert of extension details), which has two consequences:
  1. Debugging is triggered, if configured accordingly (devIpMask, ...), which leads to a timeout explaining the sporadic occurrence of this error.
  2. Extensions of the currently fetched batch (50 pin it) are not inserted into the DB.

The DB error
The insert looks like this:
INSERT INTO tx_extensionmanager_domain_model_extension (extension_key, version, integer_version, alldownloadcounter, downloadcounter, title, ownerusername, author_name, author_email, authorcompany, last_updated, md5hash, repository, state, review_state, category, description, serialized_dependencies, update_comment) VALUES ('qrcode', '1.0.0', 1000000, 155, 0, 'QR Code', 'b263', 'Bastian Braeu', 'bb@bftmedia.de', '', 1361908312, '3a7f3e83cbddbd910163ef5eb26d5937', 1, 999, 0, plugin, 'Display QR codes as content elements, embed as Fluidtemplate, or use the view helper in your own extensions.', 'a:1:{s:7:\"depends\";a:3:{s:3:\"cms\";s:12:\"6.0.0-6.0.99\";s:7:\"extbase\";s:12:\"6.0.0-6.0.99\";s:5:\"fluid\";s:12:\"6.0.0-6.0.99\";}}', 'TYPO3 CMS 6.0');

Error message: Unknown column 'plugin' in 'field list'.

Peculiarly the value "plugin" is not escaped!
A comparison with other SQL statements shows that this column usually contains a number.

Matching this against the original XML structure, where the SQL is generated from, shows that for working records there is a line <category>plugin</category>, whereas for non-working records this line contains a number, <category>3</category>.

Conclusion
  1. The original data of the TER are wrong.
  2. Input data validation is not done properly.

The main reason for the timeout is the slow processing in TYPO3\CMS\Core\Encoder::encode() for the debug output of 21k.
After fixing this by using mbstring, another problem arose.
The debug output invalidates the JSON Output expected by the Ajax Calls.

Disabling debugging fixes the endless spinner problem, but quite some extensions are missing in the DB, due to the aborted insert statements.

Things to be done now:
  1. Error message if the TER import has a problem (invalid JSON response)
  2. Correction of invalid data in TER (category)
  3. Validation before running the insert statement. (#46115)

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #43539: EM: Maximum execution time exceeded ClosedFranz Holzinger2012-12-03

Actions
Related to TYPO3 Core - Bug #46115: Importing extensions from repository failsClosed2013-03-07

Actions
Actions #1

Updated by Christian Kuhn over 11 years ago

the db error is fixed, will be released with 6.0.5, see #46115

Actions #2

Updated by Mathias Schreiber almost 10 years ago

  • Status changed from New to Closed
  • Is Regression set to No
Actions #3

Updated by Markus Klein almost 10 years ago

  • Status changed from Closed to Accepted

Point number one is still open.

Actions #4

Updated by Mathias Schreiber about 9 years ago

  • Status changed from Accepted to Closed
Actions

Also available in: Atom PDF