Bug #67446

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

Added by Mathias Bruckmoser over 6 years ago. Updated about 4 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

#1

Updated by Benni Mack over 6 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.

#2

Updated by Mathias Bruckmoser over 6 years ago

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

#3

Updated by Alexander Opitz over 6 years ago

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

Updated by Benni Mack over 6 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.

#5

Updated by Mathias Bruckmoser over 6 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.

#6

Updated by Riccardo De Contardi about 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF