Project

General

Profile

Actions

Bug #53893

closed

Editing of included TypoScript file content via Backend results in wrong line endings (CRLF)

Added by Benjamin Robinson about 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
Start date:
2013-11-22
Due date:
% Done:

100%

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

Description

If an included TypoScript-file is edited in the Backend (Template -> Info/Modify -> Setup) the line breaks will be saved as CRLF. In accordance with the Coding Guidelines LF should always be used.

Precondition: t3editor (Editor with syntax highlighting) is NOT installed. The use of t3editor seems to solve this issue, but has other issues like converting tablulators to spaces.

How to reproduce the issue:
  • Create a new textfile "fileadmin/setup.ts" via Filelist
  • Include this in the Setup of a new Template:
    <INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/setup.ts">
  • Select the "Include TypoScript file content" option
  • Enter some content (manual):
    page = PAGE
    page{
        10 = TEXT
        10.value = Hello World!
    }
  • Save
  • View the file with a Texteditor that can display line endings (f.e. Notepad++)

The problem may be that the Browser (Firefox 25.0.1, OS X, in my case) sends the <textarea>-content with CRLF.
A solution could be to convert all CRLF to LF before writing to the file.

Interesting discussion about how browsers send textarea-content: http://stackoverflow.com/questions/6324167/do-browsers-send-r-n-or-n-or-does-it-depend-on-the-browser


Files

editor-screenshot.png (10.4 KB) editor-screenshot.png Benjamin Robinson, 2013-11-22 22:11

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #56630: INCLUDE_TYPOSCRIPT: Number of rows increases with each load/saveClosed2014-03-06

Actions
Actions #1

Updated by Markus Klein about 11 years ago

  • Category set to TypoScript
  • Target version set to next-patchlevel
  • TYPO3 Version changed from 6.1 to 4.7

4.7 till 6.2 is affected here!

Actions #2

Updated by Gerrit Code Review almost 10 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/35808

Actions #3

Updated by Gerrit Code Review almost 10 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/35808

Actions #4

Updated by Gerrit Code Review almost 10 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/35808

Actions #5

Updated by Gerrit Code Review almost 10 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35839

Actions #6

Updated by Stefan Neufeind almost 10 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF