Bug #85346

Typoscript Editor not showing entries from line about 670

Added by Martin Weymayer over 1 year ago. Updated 5 months ago.

Status:
Resolved
Priority:
Must have
Assignee:
-
Category:
t3editor
Target version:
-
Start date:
2018-06-22
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I have many entries in typoscript template setup (about 800 lines). But editor shows empty lines after certain line (for my example line 673). see screenshots.

typo3-1.jpg View (82.7 KB) Martin Weymayer, 2018-06-22 20:09

typo3-2.jpg View (52.2 KB) Martin Weymayer, 2018-06-22 20:10


Related issues

Related to TYPO3 Core - Bug #88262: t3Editor: JS Crash "VM3084 typoscript.js:1193 Uncaught TypeError: Cannot read property 'lex' of null" Resolved 2019-05-03

Associated revisions

Revision 9441ed24 (diff)
Added by Andreas Fernandez 5 months ago

[BUGFIX] t3editor: Harden some checks for TS parsing

Resolves: #88262
Resolves: #85346
Releases: master, 9.5
Change-Id: Ia72ef1b670841d90ec0251c99b7f4d3dc1e7770a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60900
Tested-by: TYPO3com <>
Tested-by: Riccardo De Contardi <>
Tested-by: Sven Juergens <>
Tested-by: Georg Ringer <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Georg Ringer <>
Reviewed-by: Andreas Fernandez <>

Revision 79825a69 (diff)
Added by Andreas Fernandez 5 months ago

[BUGFIX] t3editor: Harden some checks for TS parsing

Resolves: #88262
Resolves: #85346
Releases: master, 9.5
Change-Id: Ia72ef1b670841d90ec0251c99b7f4d3dc1e7770a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61053
Tested-by: TYPO3com <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Andreas Fernandez <>

History

#1 Updated by Guido Schmechel over 1 year ago

Can you please possibly attach your TypoScript as a file? I simply generated 1000 lines with config.baseURL and that was no problem. Maybe it's more of a certain setting/line.

#2 Updated by Georg Ringer over 1 year ago

  • Status changed from New to Needs Feedback

#3 Updated by Martin Weymayer over 1 year ago

yes - you are right. new editor has problems with scripts like analytics:

page.headerData.20 = TEXT
page.headerData.20.value (
<script>
var gaProperty = 'UA-xxx-3';

var disableStr = 'ga-disable-' + gaProperty;
if (document.cookie.indexOf(disableStr + '=true') > -1) {

window[disableStr] = true;
}
function gaOptout() {

document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
window[disableStr] = true;
}
</script>

<script type="text/javascript">
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-xxx-3', 'auto');
  ga('send', 'pageview');
  ga('set', 'anonymizeIp', true);

</script>

)

two more thins would be nice to have:
- height of editor should be higher
- clicking "strg + s" should save datas like in "old" editor

martin

#4 Updated by Riccardo De Contardi about 1 year ago

  • Status changed from Needs Feedback to New

The issue is still reproducible with 9.5.2-dev (latest master)

if you just try to copy and paste the code in comment 3 inside the TS Setup field, everything is not visibile. The problem seems caused by the second script block

#5 Updated by Georg Ringer about 1 year ago

  • Category set to t3editor
  • Status changed from New to Accepted

#6 Updated by Riccardo De Contardi 6 months ago

  • Related to Bug #88262: t3Editor: JS Crash "VM3084 typoscript.js:1193 Uncaught TypeError: Cannot read property 'lex' of null" added

#7 Updated by Riccardo De Contardi 6 months ago

As reported also here #88262 the editor throws the error:

Uncaught TypeError: Cannot read property 'lex' of null

The "Problematic" piece fo code that crashes the editor is just:

function()

To be more precise, the error triggers when you write:

page.headerData.20 = TEXT
page.headerData.20.value (
function() something
function() 
)

or

page.headerData.20 = TEXT
page.headerData.20.value (
something something() something
function() 
)

but on both cases only at the second "function()" and only when you write the "()"

It does not occur with:

page.headerData.20 = TEXT
page.headerData.20.value (
something() something
function() 
)

#8 Updated by Nikolas Hagelstein 6 months ago

Confirmed on 9.5.6 happens to facebook tracking pixels as well.

#9 Updated by Gerrit Code Review 6 months ago

  • Status changed from Accepted to Under Review

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/c/Packages/TYPO3.CMS/+/60900

#10 Updated by Gerrit Code Review 5 months ago

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

#11 Updated by Andreas Fernandez 5 months ago

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

Also available in: Atom PDF