Discussion:
[TYPO3-english] BE Module can not locate template in 7.x
Vikram
2017-08-24 05:24:59 UTC
Permalink
Hi,


I have this weird issue for few days now. My new backend module can not
locate the template file in Typo3 7.x but it works good in Typo3 8.x
though. Here are my TS:

module.tx_t3inamp_amp {
view {
# cat=module.tx_t3inamp_amp/file; type=string; label=Path to
template root (BE)
templateRootPath = EXT:t3in_amp/Resources/Private/Templates/Backend/
# cat=module.tx_t3inamp_amp/file; type=string; label=Path to
template partials (BE)
partialRootPath = EXT:t3in_amp/Resources/Private/Partials/Backend/
# cat=module.tx_t3inamp_amp/file; type=string; label=Path to
template layouts (BE)
layoutRootPath = EXT:t3in_amp/Resources/Private/Layouts/Backend/
}
persistence {
# cat=module.tx_t3inamp_amp//a; type=string; label=Default storage PID
storagePid =
}
}

--------
module.tx_t3inamp_web_t3inampamp {
persistence {
storagePid = {$module.tx_t3inamp_amp.persistence.storagePid}
}
view {
templateRootPaths {
0 = EXT:t3in_amp/Resources/Private/Templates/Backend/
1 = {$module.tx_t3inamp_amp.view.templateRootPath}
}
partialRootPaths {
0 = EXT:t3in_amp/Resources/Private/Partials/Backend/
1 = {$module.tx_t3inamp_amp.view.partialRootPath}
}
layoutRootPaths {
0 = EXT:t3in_amp/Resources/Private/Layouts/Backend/
1 = {$module.tx_t3inamp_amp.view.layoutRootPath}
}
}
}

----

The template files are under
/typo3conf/ext/t3in_amp/Resources/Private/Templates/Backend/

I have tried chnaging the locations to
/typo3conf/ext/t3in_amp/Resources/Private/Backend/Templates/

But these also did not work out.

I keep getting this error:
Sorry, the requested view was not found.

The technical reason is: No template was found. View could not be
resolved for action "start" in class
"T3IN\T3inAmp\Controller\AMPController".

I do have the file at
/typo3conf/ext/t3in_amp/Resources/Private/Templates/Backend/Start.html

regards
Vikram
Vikram Mandal
2017-08-29 15:13:11 UTC
Permalink
Post by Vikram
Hi,
I have this weird issue for few days now. My new backend module can not
locate the template file in Typo3 7.x but it works good in Typo3 8.x
module.tx_t3inamp_amp {
view {
# cat=module.tx_t3inamp_amp/file; type=string; label=Path to
template root (BE)
templateRootPath = EXT:t3in_amp/Resources/Private/Templates/Backend/
# cat=module.tx_t3inamp_amp/file; type=string; label=Path to
template partials (BE)
partialRootPath = EXT:t3in_amp/Resources/Private/Partials/Backend/
# cat=module.tx_t3inamp_amp/file; type=string; label=Path to
template layouts (BE)
layoutRootPath = EXT:t3in_amp/Resources/Private/Layouts/Backend/
}
persistence {
# cat=module.tx_t3inamp_amp//a; type=string; label=Default storage PID
storagePid =
}
}
--------
module.tx_t3inamp_web_t3inampamp {
persistence {
storagePid = {$module.tx_t3inamp_amp.persistence.storagePid}
}
view {
templateRootPaths {
0 = EXT:t3in_amp/Resources/Private/Templates/Backend/
1 = {$module.tx_t3inamp_amp.view.templateRootPath}
}
partialRootPaths {
0 = EXT:t3in_amp/Resources/Private/Partials/Backend/
1 = {$module.tx_t3inamp_amp.view.partialRootPath}
}
layoutRootPaths {
0 = EXT:t3in_amp/Resources/Private/Layouts/Backend/
1 = {$module.tx_t3inamp_amp.view.layoutRootPath}
}
}
}
----
The template files are under
/typo3conf/ext/t3in_amp/Resources/Private/Templates/Backend/
I have tried chnaging the locations to
/typo3conf/ext/t3in_amp/Resources/Private/Backend/Templates/
But these also did not work out.
Sorry, the requested view was not found.
The technical reason is: No template was found. View could not be
resolved for action "start" in class
"T3IN\T3inAmp\Controller\AMPController".
I do have the file at
/typo3conf/ext/t3in_amp/Resources/Private/Templates/Backend/Start.html
regards
Vikram
It worked when I placed by file under:
/Resources/Private/Templates/AMP/

It is like: /Resources/Private/Templates/<Controller>

And the TS had no effect. May be I have some bug in the extension
created by the extension_builder extension.
--
Vikram
=============================
http://T3IN.COM
FiveE Technologies.
=============================
Jigal van Hemert
2017-09-05 09:48:19 UTC
Permalink
Hi,
Post by Vikram Mandal
Post by Vikram
The template files are under
/typo3conf/ext/t3in_amp/Resources/Private/Templates/Backend/
[...]
Post by Vikram Mandal
Post by Vikram
The technical reason is: No template was found. View could not be
resolved for action "start" in class
"T3IN\T3inAmp\Controller\AMPController".
I do have the file at
/typo3conf/ext/t3in_amp/Resources/Private/Templates/Backend/Start.html
regards
Vikram
/Resources/Private/Templates/AMP/
It is like: /Resources/Private/Templates/<Controller>
And the TS had no effect. May be I have some bug in the extension
created by the extension_builder extension.
Did you include that static templates of your extension in the root
template? Maybe there is an ext_typoscript_setup.txt in your extension
which contains configuration for the paths that do work. This file is
automatically loaded and not like normal static templates only when
included in a root template.

These paths work, but you have to take into consideration that the
templates live in a subdirectory with the name of the controller
(without "Controller").
--
Jigal van Hemert
TYPO3 CMS Core Team Member

TYPO3 .... inspiring people to share!
Get involved: typo3.org
Vikram Mandal
2017-09-06 05:46:15 UTC
Permalink
Post by Jigal van Hemert
Did you include that static templates of your extension in the root
template?
yes
Post by Jigal van Hemert
Maybe there is an ext_typoscript_setup.txt in your extension
which contains configuration for the paths that do work. This file is
automatically loaded and not like normal static templates only when
included in a root template.
I do not have ext_typoscript_setup.txt file as I do not need it.
Post by Jigal van Hemert
These paths work, but you have to take into consideration that the
templates live in a subdirectory with the name of the controller
(without "Controller").
I have tried placing them in subdirectory under controller named
directory. Still it does not work.

The thing is that it works good in Typo3 8.x ..but why not on Typo3 7.x
--
Vikram
=============================
http://T3IN.COM
FiveE Technologies.
=============================
Loading...