Project

General

Profile

Actions

Bug #45945

closed

optionSplit din't work well when using noTrimWrap special configuration

Added by Christophe Monard over 11 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2013-03-01
Due date:
% Done:

100%

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

Description

Hi there,

When using optionSplit by calling splitConfArray function, there might be a bug when setting noTrimWrap to "|| |" or "| ||".

an easy correction is to add a special condition for each segments:

File: t3lib/class.t3lib_tstemplate.php
for 4.5:

    L. 1135: change to if ($main[0] && $cKey != 'noTrimWrap') {
    L. 1139: change to if ($main[1] && $cKey != 'noTrimWrap') {
    L. 1143: change to if ($main[2] && $cKey != 'noTrimWrap') {

for 4.7:

    L. 1009: change to if ($main[0] && $cKey != 'noTrimWrap') {
    L. 1013: change to if ($main[1] && $cKey != 'noTrimWrap') {
    L. 1017: change to if ($main[2] && $cKey != 'noTrimWrap') {

Actions #1

Updated by Stefan Galinski over 11 years ago

Hi Christophe,

As you already found a working solution, can you please finalize your contribution by pushing this to our review system (http://review.typo3.org)? The workflow is documented here: http://wiki.typo3.org/Contribution_Walkthrough_Tutorials

Actions #2

Updated by Christophe Monard over 11 years ago

a better working correction:
TYPO3 4.7
L.997:
replace
if (!strstr($val, '|*|') && !strstr($val, '||')) {
by
if ($cKey == 'noTrimWrap' || (!strstr($val, '|*|') && !strstr($val, '||'))) {

Woking on the review for submitting

Actions #3

Updated by Gerrit Code Review over 11 years ago

  • Status changed from New to Under Review

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/18825

Actions #4

Updated by Wouter Wolters almost 10 years ago

  • Status changed from Under Review to New
  • Is Regression set to No
Actions #5

Updated by Christophe Monard almost 10 years ago

  • % Done changed from 0 to 100

Not needed anymore since 6.1 branch and the introduction of the splitChar properties.

Actions #6

Updated by Riccardo De Contardi almost 10 years ago

so this could be set as closed?

Actions #7

Updated by Christophe Monard almost 10 years ago

Yes, i think no new fonctionnality should be planned for 4.5 branch.

Actions #8

Updated by Mathias Schreiber over 9 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF