Feature #37180

Extjs shall not overwrite $GLOBALS['error']

Added by Franz Holzinger about 7 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-05-15
Due date:
% Done:

100%

PHP Version:
5.3
Tags:
Complexity:
Sprint Focus:

Description

The file 't3lib/extjs/class.t3lib_extjs_extdirectrouter.php' overwrites the global error variable.

public function route($ajaxParams, TYPO3AJAX $ajaxObj) {
$GLOBALS['error'] = t3lib_div::makeInstance('t3lib_extjs_ExtDirectDebug');

This leads to a collision with other debug extensions which use the $GLOBALS['error']. It should better check if this variable has already been set by another extension and not overwrite it.


Related issues

Related to TYPO3 Core - Epic #68075: Remove ExtJS from backend Closed 2014-11-04

Associated revisions

Revision 0b52db2e (diff)
Added by Benni Mack almost 2 years ago

[!!!][TASK] Remove ExtJS Debugging and $GLOBALS['error']

The global variable $GLOBAL['error'] is used only in ExtJS-context for ExtDirect
(via ExtDirectDebug) however, but evaluates at every request.

This is the first of a series of patches to remove ExtJS in total.

The global methods debugBegin() and debugEnd() are removed as well.

Resolves: #37180
Releases: master
Change-Id: I00843d85660e85c213ac66059abdd84344c4fe3f
Reviewed-on: https://review.typo3.org/53817
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Franz Holzinger about 7 years ago

Another solution would be to change the variable $GLOBALS['error'] into an array of objects. Then all the debug functions of all those objects should be called in config_default.php.

#2 Updated by Philipp Gampe about 7 years ago

But changing it into an array would break existing extensions, wouldn't it?

#3 Updated by Franz Holzinger about 7 years ago

Yes, a change into an error would break current extensions. However there are only very few debug extension which use the global ERROR object. So this won't hurt. The extension which use debugging just have lines containing 'debug' and nothing else.
I think that currently there are only 3 debug extensions. Their code can be adapted for a newer version of TYPO3.

#4 Updated by Mathias Schreiber over 4 years ago

  • Target version set to 7.1 (Cleanup)

should be namespaced to TYPO3.ERROR or something alike.

#5 Updated by Benni Mack about 4 years ago

  • Target version changed from 7.1 (Cleanup) to 7.4 (Backend)

#6 Updated by Susanne Moog almost 4 years ago

  • Target version changed from 7.4 (Backend) to 7.5

#7 Updated by Benni Mack almost 4 years ago

  • Target version deleted (7.5)

#8 Updated by Georg Ringer almost 2 years ago

  • Related to Epic #68075: Remove ExtJS from backend added

#9 Updated by Gerrit Code Review almost 2 years ago

  • Status changed from New to Under Review

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/53817

#10 Updated by Gerrit Code Review almost 2 years 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/53817

#11 Updated by Gerrit Code Review almost 2 years ago

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

#12 Updated by Benni Mack almost 2 years ago

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

#13 Updated by Benni Mack 10 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF