Results 1 to 7 of 7

Thread: Own CE gallery template - error in BE

  1. #1
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default 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?
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

  2. #2
    Core developer
    Official Contao Team
    leo's Avatar
    Join Date
    06-04-09.
    Location
    Wuppertal, Germany
    Posts
    201

    Default Re: Own CE gallery template - error in BE

    Did you make "/template/oliwia" the templates forlder of your theme?

  3. #3
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default 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
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

  4. #4
    Core developer
    Official Contao Team
    leo's Avatar
    Join Date
    06-04-09.
    Location
    Wuppertal, Germany
    Posts
    201

    Default Re: Own CE gallery template - error in BE

    How do I reproduce the issue?

  5. #5
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default 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.
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

  6. #6
    Core developer
    Official Contao Team
    leo's Avatar
    Join Date
    06-04-09.
    Location
    Wuppertal, Germany
    Posts
    201

    Default 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.

  7. #7
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default 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.
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •