Bug #89124
closedTemplate TypoScript editor broken and not working
100%
Description
For test purpose I have updated a project from v9.5 to v10. Everything seems to working great, except the template editor for TypoScript. First its loading fine, for a second the both textareas for Constants and Setup are displayed, but than it totally messes up. The textboxes disappear and all the TypoScript lines are displayed in weired non-editable lines (see screenshot). Guessing its a JavaScript error which is parsing the TypoScript content wrong (but nothing is printed to the browser console). Same happens also if I create a new Site Template on a new root page.
I've tested it in Firefox and Chromium with same result.
System:
Ubuntu 18, Apache 2.4, PHP 7.2, Application context is "Development".
I've only the extension bootstrap_package v11.0.0 installed.
Files
Updated by Christian Eßl about 5 years ago
Can't reproduce this in 10.2.0-dev. What kind of javascript errors are logged to the console?
Updated by Riccardo De Contardi about 5 years ago
If it is an update, I'd also try to clear every cache, temporary file and browser cache.
Updated by Riccardo De Contardi almost 5 years ago
I tried to reproduce this issue with
- installing a fresh TYPO3 9.5 version
- updating it to 10.2
But I was not able to reproduce it :(
We would need more detail, do you have php errors? Javascript errors?
Updated by Benni Mack almost 5 years ago
- Status changed from New to Closed
Hey Bastian,
I will close this issue now, seems like we fixed this with the latest 10.2 version. Feel free to contact me if you still experience this issue so I can re-open the ticket then.
Updated by Bastian Stargazer almost 5 years ago
- Priority changed from Should have to Must have
- % Done changed from 0 to 100
- PHP Version deleted (
7.2)
Good Morning,
it seems I was not fast enough after I received the first email Riccardo today morning ;-)
As you closed the issues I was just setting up a test environment of the same v9.5 project to update it again.
Anyway, now I was able to successfully update it to 10.2.2, everything works like charm and the issue seems to be gone.
Thanks and have a good day!
Updated by Davide Alghi almost 5 years ago
Bastian Stargazer wrote:
For test purpose I have updated a project from v9.5 to v10. Everything seems to working great, except the template editor for TypoScript. First its loading fine, for a second the both textareas for Constants and Setup are displayed, but than it totally messes up. The textboxes disappear and all the TypoScript lines are displayed in weired non-editable lines (see screenshot). Guessing its a JavaScript error which is parsing the TypoScript content wrong (but nothing is printed to the browser console). Same happens also if I create a new Site Template on a new root page.
I've tested it in Firefox and Chromium with same result.
System:
Ubuntu 18, Apache 2.4, PHP 7.2, Application context is "Development".
I've only the extension bootstrap_package v11.0.0 installed.
I know, I'm replying to a closed issue, but I'm having the same problem.
The bug issues if T3 is accessed without domain and in live preset: in debug mode everything works fine.
To reproduce the problem, T3 10.2.2 fresh installation without domain, simple path with IP address, and live preset.
t3editor.css and codemirror.css are not included into compressed file.
Passed paths ($filesToInclude) into TYPO3\CMS\Core\Resource\ResourceCompressor::createMergedFile() are wrong for t3editor css files.
I fixed (better workarounded) with
$this->resultArray['stylesheetFiles'][] = 'EXT:t3editor/Resources/Public/JavaScript/Contrib/cm/lib/codemirror.css';
$this->resultArray['stylesheetFiles'][] = 'EXT:t3editor/Resources/Public/Css/t3editor.css';
I said "workarounded" because the problem is not issued in T3 9.5 and TYPO3\CMS\T3editor\Form\Element\T3editorElement::render() code is the same. I think the bug is not here, but this is a starting point to investigate.
PS: leading slash is redundant in (but this is not the problem)
https://forge.typo3.org/projects/typo3cms-core/repository/revisions/fa12539145ff0fc056e6f2d5aa2a6ddfb9eaed47/entry/typo3/sysext/t3editor/Classes/Form/Element/T3editorElement.php#L101
Updated by Bastian Stargazer almost 5 years ago
Davide Alghi wrote:
To reproduce the problem, T3 10.2.2 fresh installation without domain, simple path with IP address, and live preset.
You're right! My test installation was set to Development context. After switching to Production, the issue occurs again.
But I'm not sure if your conclusion about the CSS files matches in my case. Because I see the TypoScript Editor (both for Constants and Setup) rendered and displayed successfully, but just for a blink of a second. Than it messes up.
What I have just observed is, that after the page is rendered and the editors are displayed, 3 AJAX requests are made and one fails:
1) /typo3/index.php?route=/ajax/usersettings/process&token=[...]&action=getAll HTTP/1.1 200 OK
2) /typo3/index.php?route=/ajax/t3editor/tsref&token=[...] HTTP/1.1 200 OK
3) /typo3/index.php?route=/ajax/t3editor/codecompletion/load-templates&token=[...]&pageId=9 HTTP/1.1 500 ERROR
The exception thrown at this request is:
Argument 1 passed to TYPO3\CMS\T3editor\Controller\CodeCompletionController::treeWalkCleanup() must be of the type array, string given, called in /home/[...]/typo3_src-10.2.2/typo3/sysext/t3editor/Classes/Controller/CodeCompletionController.php on line 103
What makes it really strange is after I switch back to Development context, the same error is thrown if I open the TS editor, but still its usable (not get messed up).
I've seen this exception in all of my live-installations in the syslog after editing any TypoScript (using the editor). It seems to have no sideeffects so I was good with this (there is even a open Issue for that: https://forge.typo3.org/issues/84534). But now I got curious and started digging a bit more, it seems the issues are related.
It simply comes from TypoScript with a dot like described in #84534. To reproduce:
// Constants:
page.meta {
geo.position = abc // escaping the dot has no effect, error is thrown ether way
geo.placename = mno
geo.region = xyz
}
// Setup:
page.meta {
geo\.position = {$page.meta.geo.position} // escaping the dot has no effect, error is thrown ether way
geo\.placename = {$page.meta.geo.placename}
geo\.region = {$page.meta.geo.region}
}
So, we can close this and upvote #84534 instead?! :D
Updated by Benni Mack almost 5 years ago
- Related to Bug #84534: Dots in TypoScript keys break autocomplete added
Updated by Georg Ringer almost 5 years ago
- Has duplicate Bug #89909: Template Editor: Text fields "Setup" and "Constants" disappears added
Updated by Jochen Mo almost 5 years ago
Hello everyone. Thanks for checking! I checked the issue again today and it still occurs in the lastest version of TYPO3, v10.2.2 which is installed.
Updated by Benni Mack over 4 years ago
- Related to Bug #90689: ResourceCompressor can't deal with paths relative to docroot (Reoccurrence) added
Updated by Frank Nägler over 4 years ago
- Status changed from New to Needs Feedback
Hello and thank you for your report.
We can't reproduce the issue with the current master branch.
We think this issue could be solved with another issue in the past.
Can you please check if this issue still exists?
Updated by Bastian Stargazer over 4 years ago
- File screenshot-t3-ts-error2.png screenshot-t3-ts-error2.png added
- File t3-js-404s2.png t3-js-404s2.png added
Frank Naegler wrote:
Can you please check if this issue still exists?
Unfortunately the issue still exists in 10.4.0-dev (hope that is the current master branch). Here is what I did:
$ git clone git://git.typo3.org/Packages/TYPO3.CMS.git typo3-test $ cd typo3-test $ composer install
- Run TYPO3 installer
- Created new Root-Page
- Created new template in Template module ("Create template for a new site")
- After clicking on "Edit the whole template record" the constant/setup textareas showing up for 1 sek. with their values and than becoming messed up again (see screenshot attached).
Because recently I had trouble working in v10 as relative path installation (see #90689), I checked if this issue might be related. So I setup devv and start this instance served from a proper domain. Result: its working better! At least the constant/setup editor seems to work, BUT only half of the time, because lots of JS files can't be loaded and throw a 404 (see second screenshot).
Strangely enough the template editing seems to work if you click the "edit" button inside the list-module. If you are in the template-module and using the "Edit the whole template record" button, the JS files can't be loaded. It's very wired and hard to produce (because sometimes it seems to work if you switch from list to template module the first time. But second click again results in JS 404s).
Updated by Davide Alghi over 4 years ago
- File KO-dashboard.png KO-dashboard.png added
- File KO-template.png KO-template.png added
- File KO-log.png KO-log.png added
- File OK-dashboard.png OK-dashboard.png added
- File OK-template.png OK-template.png added
- File phpInfo.pdf phpInfo.pdf added
I just tested with master branch: problem persists, but, as I said in my previous comment, only with IP address; bug disappears when I use domain as address.
I've also problem with dashboard rendering. I attached KO and OK screenshots; my phpInfo too.
Copying from Bastian Stargazer, my steps:
- git clone git://git.typo3.org/Packages/TYPO3.CMS.git
- composer install
- run installer
then
- accessed to BE (by IP address)
- created root page
- added a template record on root page
- constants and setup textarea are not there
but ... on same installation by domain address (the problem disappears)
- added a template record on root page
- constants and setup textarea are there
Updated by Bastian Stargazer over 4 years ago
Oh sh** you're right, I've overseen again your previous hint related to the IP address... sorry.
I can confirm this, as I'm accessing my dev-server by IP address.
Updated by Markus Klein over 4 years ago
- File KO-dashboard error.jpg KO-dashboard error.jpg added
I can reproduce the problem with the following setup:
- DNS: localhost
- Core in subfolder "t3"
- BE|debug = false
- SYS|displayErrors = 1
- SYS|exceptionalErrors = 12290,
- ApplicationContext = Development
Updated by Markus Klein over 4 years ago
- Category changed from TypoScript to Backend API
- Status changed from Needs Feedback to Accepted
- % Done changed from 100 to 0
Updated by Markus Klein over 4 years ago
file_get_contents(/var/www/html/t3/typo3//t3/typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/lib/codemirror.css)
Updated by Gerrit Code Review over 4 years ago
- Status changed from Accepted 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 https://review.typo3.org/c/Packages/TYPO3.CMS/+/63714
Updated by Markus Klein over 4 years ago
- Related to deleted (Bug #84534: Dots in TypoScript keys break autocomplete)
Updated by Gerrit Code Review over 4 years ago
Patch set 2 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/+/63714
Updated by Gerrit Code Review over 4 years ago
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/+/63714
Updated by Gerrit Code Review over 4 years ago
Patch set 4 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/+/63714
Updated by Gerrit Code Review over 4 years ago
Patch set 5 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/+/63714
Updated by Davide Alghi over 4 years ago
I just tested "Patch set 5" and it works for me.
Both dashboard rendering and template constants/setup editing.
Both IP and domain addressing work.
Updated by Bastian Stargazer over 4 years ago
Davide Alghi wrote:
I just tested "Patch set 5" and it works for me.
Same for me, issue solved.
Updated by Gerrit Code Review over 4 years ago
Patch set 6 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/+/63714
Updated by Gerrit Code Review over 4 years ago
Patch set 7 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/+/63714
Updated by Gerrit Code Review over 4 years ago
Patch set 8 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/+/63714
Updated by Gerrit Code Review over 4 years ago
Patch set 9 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/+/63714
Updated by Gerrit Code Review over 4 years ago
Patch set 10 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/+/63714
Updated by Gerrit Code Review over 4 years ago
Patch set 11 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/+/63714
Updated by Gerrit Code Review over 4 years ago
Patch set 12 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/+/63714
Updated by Gerrit Code Review over 4 years ago
Patch set 13 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/+/63714
Updated by Gerrit Code Review over 4 years ago
Patch set 14 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/+/63714
Updated by Gerrit Code Review over 4 years 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/+/63773
Updated by Gerrit Code Review over 4 years ago
Patch set 2 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/+/63773
Updated by Gerrit Code Review over 4 years ago
Patch set 3 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/+/63773
Updated by Markus Klein over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 6c6baa8787b5fa092db801ab15584617f6e78233.