Project

General

Profile

Actions

Bug #67446

closed

TYPO3 7.2.0 - Backend JS: "Uncaught TypeError: require is not a function" in BE-Module

Added by Anonymous almost 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
Start date:
2015-06-15
Due date:
% Done:

0%

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

Description

In my BE-MODULE always this javascript error is thrown by the core in the oldschool-iframe:
Uncaught TypeError: require is not a function

JS-Console:
<script type="text/javascript">
/*<![CDATA[*/
/*RequireJS-Module-TYPO3/CMS/Backend/LegacyCssClasses*/
require(["TYPO3/CMS/Backend/LegacyCssClasses"]);

/*RequireJS-Module-TYPO3/CMS/Backend/ClickMenu*/
require(["TYPO3/CMS/Backend/ClickMenu"]);

/*RequireJS-Module-TYPO3/CMS/Backend/ContextHelp*/
require(["TYPO3/CMS/Backend/ContextHelp"]);

It seems to a mistake output of some PHP-Code. Tested in Chrome and current FF.


Files

Actions #1

Updated by Benni Mack almost 9 years ago

  • Status changed from New to Needs Feedback

Hey,

could you share your extension / backend module please? In my custom / own backend modules there is no problem with the current latest version.

Updated by Anonymous almost 9 years ago

Here is a Mock-up from my module called "Foobar". Base from current ExtensionBuilder from GIT. Same Error, see screen.

Actions #3

Updated by Alexander Opitz almost 9 years ago

  • Status changed from Needs Feedback to New
  • Target version set to 7.4 (Backend)
Actions #4

Updated by Benni Mack almost 9 years ago

  • Status changed from New to Resolved

Have you noticed that there are two HTML tags in your backend module? Because you use <be.container> twice thus, including RequireJS loaded twice resulting in an error.

Actions #5

Updated by Anonymous almost 9 years ago

Resolved - seems not.

Same code works in 6.2, so this is no solution "Do not use the frameworks viewhelper more than one time".
Why does the exception not handled by the viewhelper? This looks for a correct way to fix this.

Actions #6

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF