Bug #30863
closedt3lib_pagerenderer
100%
Description
Class:
t3lib_PageRenderer
Function:
includeLanguageFileForInline
Line 1818
$key = preg_replace($labelPattern, '', $label);
$labelsFromFile[$label] = $value;
$labelsFromFile[$label] must $labelsFromFile[$key]
Jens
Files
Updated by Steffen Gebert almost 13 years ago
- Category set to Backend API
- Complexity set to easy
Updated by Jens Witt almost 13 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
Updated by Jens Witt almost 13 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
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)?
Updated by Riccardo De Contardi over 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; } }
Updated by Riccardo De Contardi about 9 years ago
still present in 7 (latest master), same file, lines 2572 and 2575
Updated by Alexander Opitz about 9 years ago
- Status changed from Needs Feedback to New
- Target version set to 7.5
Updated by Gerrit Code Review about 9 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
Updated by Daniel Goerz about 9 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:
- Install EXT:inlinelablefiles
- Create a new PageTree with a new root template record (make sure the page object is configured, Hello World is fine)
- Include the static template of EXT:inlinelablefiles
- See the output in the frontend (L=1 switches to german labels) in the <head>
- Play around with the selectionPrefix and stripFromSelectionName options.
Updated by Gerrit Code Review about 9 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
Updated by Gerrit Code Review about 9 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
Updated by Gerrit Code Review about 9 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
Updated by Daniel Goerz about 9 years ago
- Sprint Focus set to On Location Sprint
Updated by Daniel Goerz about 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset cf57f0793845fcfeb4edf4fbbe005351b8c7ea25.
Updated by Anja Leichsenring over 8 years ago
- Sprint Focus deleted (
On Location Sprint)
Updated by Riccardo De Contardi almost 7 years ago
- Status changed from Resolved to Closed