Russian TYPO3 community

Russian TYPO3 community (http://forum.typo3.ru/index.php)
-   Общие вопросы (http://forum.typo3.ru/forumdisplay.php?f=12)
-   -   Fluid Templating Error (http://forum.typo3.ru/showthread.php?t=12317)

Николай Сипко 23.02.2018 00:59

Fluid Templating Error
 
Решил попрактиковаться в http://typo3buddy.com/typo3-template-tutorial/fluid/

Но получил ошибку как в сообщении о Fluid Templating Error TYPO3 8.4.1
https://stackoverflow.com/questions/...or-typo3-8-4-1

Ошибка та же, только в TYPO3 9.1.0: в более ранних версиях ее не возникало

В setup поставил config.contentObjectExceptionHandler = 0, в FE пишет:

Oops, an error occurred!
The Fluid template files "/var/www/buddy/fileadmin/templates/layouts/Main_layout.html", "/var/www/buddy/fileadmin/templates/layouts/Main_layout" could not be loaded.
More information regarding this error might be available online.

А в system.log:

Error handler
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1225709595: The Fluid template files "/var/www/buddy/fileadmin/templates/layouts/Main_layout.html", "/var/www/buddy/fileadmin/templates/layouts/Main_layout" could not be loaded. | TYPO3Fluid\Fluid\View\Exception\InvalidTemplateRes ourceException thrown in file /var/www/typo3_src-9.1.0/vendor/typo3fluid/fluid/src/View/TemplatePaths.php in line 722. Requested URL: http://localhost/buddy/index.php?id=2

Кто подскажет, в чем дело?

Николай Сипко 23.02.2018 03:20

Ошибка происходит при связывании существующего шаблона с макетом

TYPO3 Fluid: Link your existing template to the layout
http://typo3buddy.com/typo3-template...t-to-template/

fileadmin/templates/main_1_column_with_menu.html нужно отредактировать от исходного

<div id="content">
   <div id="content_menu">
   <f:cObject typoscriptObjectPath="lib.content_menu" />
   </div>
   <div id="content_main">
   <f:format.raw>{content_main}</f:format.raw>
   </div>
   <div class="clearer"></div>
</div>

до

<f:layout name="main_layout" />
<f:section name="content">
<div id="content">
   <div id="content_menu">
   <f:cObject typoscriptObjectPath="lib.content_menu" />
   </div>
   <div id="content_main">
   <f:format.raw>{content_main}</f:format.raw>
   </div>
   <div class="clearer"></div>
</div>
</f:section>

Но стоит добавить один лишь <f:layout name="main_layout" /> и появляется ошибка

Хотя код классический: https://pastebin.com/BcdKkkwR

Если дело не в коде, то в чем же?

Николай Сипко 23.02.2018 17:54

Вложений: 1
Решено

Все оказалось не просто, а очень просто: поменял названия файлов в fileadmin и setup

main_layout.html
footer.html
header_top.html

на

Main_layout.html
Footer.html
Header_top.html

и свершилось чудо (см. приложение)

Теперь продолжу практику во TYPO3 Fluid template tutorial: дополню шаблон меню и прочими плюшками

Николай Сипко 25.02.2018 19:00

Вложений: 1
Результат (см. изображение)

TYPO3Buddy: tutorial to build a TYPO3 website
http://typo3buddy.com/home/
Уникальное пособие для начинающих и продвинутых пользователей ЦиМеС TYPO3

К сожалению, Ronald Eijkman http://typo3buddy.com/about/ еще не обновил свое руководство до новейших версий TYPO3. А в них появились нюансы и они могут запутать

Огромная благодарность за его подвижнический труд


Часовой пояс GMT +4, время: 13:24.

Работает на vBulletin® версия 3.8.1.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot