Project

General

Profile

Actions

Bug #61123

closed

BELog module error: "vsprintf(): Too few arguments" the second

Added by Thomas Bach over 9 years ago. Updated over 6 years ago.

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

0%

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

Description

I get many Errors of the following in the Backend:

Core: Error handler (BE): PHP Warning: vsprintf(): Too few arguments in /var/www/sites/muehlhof.ch/httpdocs/cms/typo3_src-6.2.4/typo3/sysext/belog/Classes/ViewHelpers/FormatDetailsViewHelper.php line 44

I found #46077 which reported similar errors and has been fixed by patching AbstractExceptionHandler.php

I found a similar line in ErrorHandler.php and by applying the following patch, the errors in the backend disappeared:

--- typo3/sysext/core/Classes/Error/ErrorHandler.php.orig    2014-08-21 17:01:38.173769303 +0200
+++ typo3/sysext/core/Classes/Error/ErrorHandler.php    2014-08-21 16:56:29.819744574 +0200
@@ -182,7 +182,7 @@
                 'action' => 0,
                 'error' => $severity,
                 'details_nr' => 0,
-                'details' => $logMessage,
+                'details' => str_replace('%', '%%', $logMessage),
                 'IP' => GeneralUtility::getIndpEnv('REMOTE_ADDR'),
                 'tstamp' => $GLOBALS['EXEC_TIME'],
                 'workspace' => $workspace

I'm not that familiar with the typo3-backend so I don't know the exact cause of these errors and wheater this is an appropriate fix for them.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #46077: BELog module error: "vsprintf(): Too few arguments"ClosedDmitry Dulepov2013-03-06

Actions
Related to TYPO3 Core - Bug #77444: BELog module error: "vsprintf(): Too few arguments" the secondClosed2016-08-08

Actions
Actions #1

Updated by Mathias Schreiber about 9 years ago

  • Category set to Logging
  • Target version set to 7.4 (Backend)
Actions #2

Updated by Franz Kugelmann almost 9 years ago

I can confirm behaviour and fix.
Since here no value is set for database column log_data and thus % will never be replaced with data, escaping the % seems quite a good solution.

We had the % showing up in error messages with encoded url paths.

Actions #3

Updated by Susanne Moog over 8 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #4

Updated by Benni Mack over 8 years ago

  • Target version changed from 7.5 to 7 LTS
Actions #5

Updated by Gerrit Code Review over 8 years 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/44401

Actions #6

Updated by Mathias Schreiber over 8 years ago

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

Updated by Tilo Baller over 7 years ago

Can someone please merge this into the 6.2 branch, because it is affected too. Thanks!

Actions #8

Updated by David Bruchmann over 7 years ago

  • % Done changed from 100 to 0
  • TYPO3 Version changed from 6.2 to 7
  • PHP Version changed from 5.3 to 5.6

Getting this Error shown in Version 7.6.15 again, so either the fix got lost somehow or there is another reason.

Actions #9

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF