Project

General

Profile

Actions

Bug #66855

closed

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

Added by Carsten Biebricher almost 9 years ago. Updated about 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 #1

Updated by Gerrit Code Review almost 9 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 http://review.typo3.org/40352

Actions #2

Updated by Claus Due over 8 years ago

I recommend closing this one, but I refrain from rejecting it outright - will comment in #67556 about suggested solution.

Actions #3

Updated by Wouter Wolters about 8 years ago

  • Status changed from Under Review to Closed

I'm closing this one to keep all information in one ticket. Please continue in https://forge.typo3.org/issues/67556

Actions #4

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from Closed to Under Review

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

Actions #5

Updated by Gerrit Code Review almost 8 years ago

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

Actions #6

Updated by Gerrit Code Review almost 8 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/48580

Actions #7

Updated by Gerrit Code Review over 7 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/48580

Actions #8

Updated by Gerrit Code Review about 7 years ago

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

Actions #9

Updated by Claus Due about 4 years ago

  • Status changed from Under Review to Closed

Re-closing after unintentionally revived to "Under review" status by gerrit patch unrelated to Fluid.

Actions

Also available in: Atom PDF