Project

General

Profile

Actions

Bug #30863

closed

t3lib_pagerenderer

Added by Jens Witt over 12 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2011-10-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

Class:
t3lib_PageRenderer
Function:
includeLanguageFileForInline

Line 1818
$key = preg_replace($labelPattern, '', $label);
$labelsFromFile[$label] = $value;

$labelsFromFile[$label] must $labelsFromFile[$key]

Jens


Files


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #57632: Configure PageRenderer->inlineLanguageLabelFile with TypoScriptClosed2014-04-04

Actions
Actions #1

Updated by Steffen Gebert over 12 years ago

  • Category set to Backend API
  • Complexity set to easy

Got broken with 5dc1ab28 (a follow-up for #15741) while copy and pasting (wtf..)

Jens, could you please point out, how to reproduce the bug? At least code-wise it looks obvious.

Actions #2

Updated by Jens Witt over 12 years ago

Steffen Gebert wrote:

Got broken with 5dc1ab28 (a follow-up for #15741) while copy and pasting (wtf..)

Jens, could you please point out, how to reproduce the bug? At least code-wise it looks obvious.

Okay, I had a look at the diff files and saw that you have changed the behavior of this function.
But. If you do so $labelPattern and the call off preg_replace are useless and even the parameter $stripFromSelectionName is useless and irritating. So its better to remove it, i think.
I prefer the old behaviour.
Jens

Actions #3

Updated by Jens Witt over 12 years ago

Steffen Gebert wrote:

Got broken with 5dc1ab28 (a follow-up for #15741) while copy and pasting (wtf..)

Jens, could you please point out, how to reproduce the bug? At least code-wise it looks obvious.

In your Testfile (t3lib_pagerendererTest.php) is the Testcase
$this->assertContains('edRecord', $out);
in the function
"areInlineLanguageLablesSelectedAndStripped() (line 844)"
wrong

it must be $this->assertNotContains('lock', $out);

if you will see that the string is stripped.

Jens

Actions #4

Updated by Alexander Opitz over 9 years ago

  • Status changed from New to Needs Feedback
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.7)?

Actions #5

Updated by Riccardo De Contardi about 9 years ago

In TYPO3 CMS 6.2.11 the only occurences of the string "$labelsFromFile[$label]" are in the file

/typo3/sysext/core/Classes/Page/PageRenderer.php, lines 2579 and 2582:

foreach ($labels as $label => $value) {
    if ($selectionPrefix === '') {
        $labelsFromFile[$label] = $value;
    } elseif (strpos($label, $selectionPrefix) === 0) {
        preg_replace($labelPattern, '', $label);
        $labelsFromFile[$label] = $value;
    }
}
Actions #6

Updated by Riccardo De Contardi almost 9 years ago

still present in 7 (latest master), same file, lines 2572 and 2575

Actions #7

Updated by Alexander Opitz almost 9 years ago

  • Status changed from Needs Feedback to New
  • Target version set to 7.5
Actions #8

Updated by Gerrit Code Review over 8 years ago

  • Status changed from New 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 http://review.typo3.org/42201

Actions #9

Updated by Daniel Goerz over 8 years ago

I stumbled over this while updating https://forge.typo3.org/issues/57632.

You can test this patch with the same example extension I made for the former mentioned. Anyway you have to apply the patch for https://forge.typo3.org/issues/57632 first since the Extension wont work otherwise.

To test ists just the same steps:

  1. Install EXT:inlinelablefiles
  2. Create a new PageTree with a new root template record (make sure the page object is configured, Hello World is fine)
  3. Include the static template of EXT:inlinelablefiles
  4. See the output in the frontend (L=1 switches to german labels) in the <head>
  5. Play around with the selectionPrefix and stripFromSelectionName options.
Actions #10

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

Actions #11

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

Actions #12

Updated by Gerrit Code Review over 8 years ago

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

Actions #13

Updated by Daniel Goerz over 8 years ago

  • Sprint Focus set to On Location Sprint
Actions #14

Updated by Daniel Goerz over 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #15

Updated by Anja Leichsenring over 8 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions #16

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF