Project

General

Profile

Actions

Bug #88150

closed

ViewHelper f:be.container - requireJs error

Added by Christian Hackl about 5 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2019-04-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
requireJs, Module, Backend
Complexity:
Is Regression:
Sprint Focus:

Description

Hello,

while using f:be.container in FLUID layouts (with and without properties) in your BE-Module the following error appears:

"Uncaught TypeError: require is not a function"
( require(["TYPO3/CMS/Backend/ContextHelp"]); )

It seems like requireJS (the command require itself) does not exist at this time.


My workaround is to use the f:be.pageRenderer ViewHelper and load the ContextHelp-Module and the jumpURL-function manually.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #94225: Deprecate f:be.container ViewHelperClosed2021-05-28

Actions
Actions #1

Updated by Christian Hackl about 5 years ago

  • Subject changed from ViewHelper f:be.container to ViewHelper f:be.container - requireJs error
  • Tags set to requireJs, Module, Backend

The same issue appears while using "<be:moduleLayout>"

Actions #2

Updated by Susanne Moog about 4 years ago

  • Category set to Backend JavaScript
Actions #3

Updated by Andreas Kienast about 4 years ago

  • Status changed from New to Needs Feedback

Where do you use this ViewHelper exactly? This ViewHelper is designed to be used in Extbase context only.
In a non-extbase context you may use <be:moduleLayout> (http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers) instead.

Actions #4

Updated by Christian Hackl about 4 years ago

@Andreas Otto † Fernandez
What do you mean "in Extbase context"?

For example, I would use it here:
https://github.com/groundstack-org/gs_monitor_observer/blob/master/Resources/Private/Layouts/Backend/Default.html

(instead of the "f:be.pageRenderer" and instead of the following script tag "<script><f:format.raw>{script}</f:format.raw></script>" - which is a workaround for js methods: jumpToUrl() and jumpExt())

Actions #5

Updated by Christian Hackl about 4 years ago

The viewhelper dukumentation does not show me any real difference between:

https://docs.typo3.org/other/typo3/view-helper-reference/9.5/en-us/typo3/fluid/latest/Be/Container.html

and

https://docs.typo3.org/other/typo3/view-helper-reference/9.5/en-us/typo3/fluid/latest/Be/PageRenderer.html

The description is identical for both... so it doesn't say anything - when, where, where, what, how and why should or can be used.

Actions #6

Updated by Christian Kuhn about 2 years ago

  • Related to Task #94225: Deprecate f:be.container ViewHelper added
Actions #7

Updated by Christian Kuhn about 2 years ago

  • Status changed from Needs Feedback to Closed

Hey.

This issue is "resolved": The f:be.container has been deprecated in v11 and removed in v12 since it basically duplicated f:be.pageRenderer.

Actions

Also available in: Atom PDF