Project

General

Profile

Actions

Bug #91371

closed

Empty website after upgrade from version 9, cObject TEMPLATE not working

Added by Pascal Oberhaensli almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2020-05-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

We upgraded a customer website from version 9 and we were not able to get any content on the website. So the website is empty (just a white page).
We reduced our source to the minimum, still the same behavior. We also re-installed a fresh 10.4.2 with our ts files. Same situation.

Even the most simple code did not work:

page = PAGE
page.10 = TEMPLATE
page.10.template = FILE
page.10.template.file = fileadmin/[template path]/template.html

Result is empty body:
<body>
</body>

Installation is Typo3 Core only, without any extensions.
No Typo3 errors, no PHP errors.
PHP Version 7.4, 7.3 same behaviour

Only with FLUIDTEMPLATE (page.10 = FLUIDTEMPLATE) the template file is processed.

Actions #1

Updated by Josef Glatz almost 4 years ago

  • Status changed from New to Needs Feedback

I think the cause is that cObject FILE was removed just by reading your issue.

  1. It was deprecated in TYPO3 9.5 LTS https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.5/Deprecation-85970-FileContentObject.html?highlight=cobject%20file -> #85970
  2. and was finally removed within https://review.typo3.org/c/Packages/TYPO3.CMS/+/59476/ -> #87477

Unfortunatly there is no ExtensionsScanner for TypoScript at the moment.

Also the docs needs to be updated: https://docs.typo3.org/m/typo3/reference-typoscript/10.4/en-us/ContentObjects/Template/Index.html

The easiest way would be to migrate to FLUIDTEMPLATE like it is already suggested at https://docs.typo3.org/m/typo3/reference-typoscript/10.4/en-us/ContentObjects/Template/Index.html in the first tip right after the heading. Alternatively you can implement FILE within your own extension explained like in https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.5/Deprecation-85970-FileContentObject.html?highlight=cobject%20file#migration and looking at the source code of https://review.typo3.org/c/Packages/TYPO3.CMS/+/59476/

Actions #2

Updated by Josef Glatz almost 4 years ago

Another workaround (tipp by Benjamin Franzke):

use cObject TEXT

page.10 = TEMPLATE
page.10 {
  template = TEXT
  template.value (
<!-- paste your template here; no escaping required; lines MUST NOT start with a closing bracket ")". -->
)
}

But as already stated in my last comment: migrate from TEMPLATE to FLUIDTEMPLATE

Actions #3

Updated by Pascal Oberhaensli almost 4 years ago

Thank you very much for your fast reply, we have been searching for hours. Mainly because there was no error message at all, and also because we create typo3 websites since more than 10 years, so we were used to do it with TEMPLATE and not with FLUIDTEMPLATE.

It would be great to have more of an error handling using an object which was available for many years.

Actions #4

Updated by Pascal Oberhaensli almost 4 years ago

Documentation Reference https://docs.typo3.org/m/typo3/reference-typoscript/10.4/en-us/ContentObjects/Template/Index.html is not visible that FILE Object is removed. We have been on this page of course to check if the syntax has changed. Only if you click on the File-Object-Link itself you can see it. It would recommend to add a hint to the TEMPLATE documentation.

Actions #5

Updated by Josef Glatz almost 4 years ago

The Benni "awesome" Mack has created an extension for you! https://extensions.typo3.org/extension/modern_template_building/

use it if you don't want to migrate.

Actions #6

Updated by Josef Glatz almost 4 years ago

If it's ok I will close this issue?!?!?

Actions #7

Updated by Pascal Oberhaensli almost 4 years ago

Many Thanks to "awesome" Mack who has created this extension, which we will test very soon.

Still I would like to recommend to change https://docs.typo3.org/m/typo3/reference-typoscript/10.4/en-us/ContentObjects/Template/Index.html in a way that (for others) it is clear that is does not work anymore as expected.

Actions #8

Updated by Pascal Oberhaensli almost 4 years ago

The Extension works for us, thank you!

Please Update the documentation as written above, can help to save hours of trying for others!

Actions #9

Updated by Riccardo De Contardi over 3 years ago

  • Status changed from Needs Feedback to Closed

I checked the documentation on

https://docs.typo3.org/m/typo3/reference-typoscript/9.5/en-us/ContentObjects/Template/Index.html

and

https://docs.typo3.org/m/typo3/reference-typoscript/10.4/en-us/ContentObjects/Template/Index.html

and

https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/ContentObjects/Template/Index.html

It has been updated and now it reads that

- The TEMPLATE object has been removed in TYPO3 11.
- The content object type FILE has been deprecated in TYPO3 9 and removed in TYPO3 10.

Therefore I close this issue.

If you think that this is the wrong decision, please reopen it or ping me.

Thank you

Actions

Also available in: Atom PDF