Own CE gallery template - error in BE
I wanted set a CE gallery but with my own template. I prepare gallery_oliwa.tpl template and upload to /template/oliwia folder where are the rest templates related to my theme.
When I created CE gallery I was able to see my own template on "Gallery template" list. After "Save" everything seems to be fine in FE and in BE. Bu when I press "Save and close" I receive this error:
Code:
Fatal error: Uncaught exception Exception with message Could not find template file "gallery_oliwa" thrown in /home/qrczak/public_html/mypage/system/libraries/Controller.php on line 109
/home/qrczak/public_html/mypage/system/libraries/Template.php(142): Controller->getTemplate('gallery_oliwa')
/home/qrczak/public_html/mypage/system/modules/frontend/FrontendTemplate.php(49): Template->parse()
/home/qrczak/public_html/mypage/system/modules/frontend/ContentGallery.php(285): FrontendTemplate->parse()
/home/qrczak/public_html/mypage/system/modules/frontend/ContentElement.php(128): ContentGallery->compile()
/home/qrczak/public_html/mypage/system/modules/frontend/ContentGallery.php(74): ContentElement->generate()
/home/qrczak/public_html/mypage/system/libraries/Controller.php(415): ContentGallery->generate()
/home/qrczak/public_html/mypage/system/modules/backend/dca/tl_content.php(781): Controller->getContentElement('142')
/home/qrczak/public_html/mypage/system/drivers/DC_Table.php(3478): tl_content->addCteType(Array)
/home/qrczak/public_html/mypage/system/drivers/DC_Table.php(345): DC_Table->parentView()
/home/qrczak/public_html/mypage/system/modules/backend/Backend.php(234): DC_Table->showAll()
/home/qrczak/public_html/mypage/contao/main.php(101): Backend->getBackendModule('article')
/home/qrczak/public_html/mypage/contao/main.php(297): Main->run()
{main}
It's mean I can't get list of CE elements of this article. The system says to me that Could not find template file "gallery_oliwa" but this template was on the list and it works in FE. But if I copy my template to /system/modules/frontend/templates error disappeared.
I checked this on two installations.
I thought that is a bug but it's looks like it's not.
So the question is: what I made wrong?
Re: Own CE gallery template - error in BE
Did you make "/template/oliwia" the templates forlder of your theme?
Re: Own CE gallery template - error in BE
Quote:
Originally Posted by leo
Did you make "/template/oliwia" the templates forlder of your theme?
Of course. And all other templates inside this folder works fine
Re: Own CE gallery template - error in BE
How do I reproduce the issue?
Re: Own CE gallery template - error in BE
Quote:
Originally Posted by leo
How do I reproduce the issue?
Make new gallery_*.tpl template. It can be copy of gallery_default.tpl but with differrent name, let's say gallery_test.tpl.
I assume that you have made theme, so you have choosen folder in "Templates folder" section (theme settings). Of course this folder is inside /template folder. Let's say the folder will /templates/galtest. Next copy your new template gallery_test.tpl to /templates/galtest. Go to any articles add new CE gallery and choose some images and choose your new template from "Gallery template" list. Press "Save" - nothing happen. Press "Save and close" - and now should appear error.
But next make second copy of gallery_test.tpl (first is still in /templates/galtest) into /system/modules/frontend/templates - error gone.
Re: Own CE gallery template - error in BE
Sorry for closing the ticket so fast. I somehow was not able to reproduce the issue the first time.
Re: Own CE gallery template - error in BE
Quote:
Originally Posted by leo
Sorry for closing the ticket so fast.
That's OK. Thanks for fix.