Project

General

Profile

Actions

Bug #66855

closed

Format/HtmlViewHelper don't render Links in TYPO3_MODE = BE

Added by Carsten Biebricher over 9 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2015-05-08
Due date:
% Done:

0%

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

Description

When I use the HtmlViewHelper in the BackendEnviroment (in my case to send emails with the scheduler) links aren't be rendered with the HtmlViewHelper. In fact they were removed from the HTML.

After some debugging it points out, that the function simulateFrontendEnvironment in the HtmlViewHelper were different to the function of the \TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility::simulateFrontendEnvironment especially in the point with the $GLOBALS['TSFE']->cObjectDepthCounter.

When set the cObjectDepthCounter in the HtmlViewHelper all links will be rendered in the right way.

Not setting the cObjectDepthCounter will result in the early exit in /typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php on line 718.


714    public function cObjGetSingle($name, $conf, $TSkey = '__') {
715        global $TYPO3_CONF_VARS;
716        $content = '';
717        // Checking that the function is not called eternally. This is done by interrupting at a depth of 100
718        $GLOBALS['TSFE']->cObjectDepthCounter--;
719        if ($GLOBALS['TSFE']->cObjectDepthCounter > 0) {

I have created two different patches.
Patch one use the \TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility::simulateFrontendEnvironment
Patch two set the cObjectDepthCounter by its own

This problem may occure in other BackendEnviroment situations with simulated Frontend Enviroments.


Files

HtmlViewHelper.Extbase.patch (1.29 KB) HtmlViewHelper.Extbase.patch Patch one :: use Extbase Carsten Biebricher, 2015-05-08 14:50
HtmlViewHelper.Inline.patch (589 Bytes) HtmlViewHelper.Inline.patch Patch two :: set cObjectDepthCounter inline Carsten Biebricher, 2015-05-08 14:50

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #67556: System news cannot render RTE contentClosed2015-06-17

Actions
Related to TYPO3 Core - Story #73183: Removal of frontend simulation in all ViewHelpersClosed2016-02-08

Actions
Has duplicate TYPO3 Core - Bug #75219: Link tag is not rendered in entries sys_news on TYPO3 login pageClosed2016-03-22

Actions
Actions

Also available in: Atom PDF