Jump to:

1844 Posts in 1600 Topics by 559 members

Blog Module

SilverStripe Forums » Blog Module » Please help installation probs, cant find template file

Discuss the Blog Module.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 864 Views
  • b0bro
    Avatar
    Community Member
    38 Posts

    Please help installation probs, cant find template file Link to this post

    The Blog seems to work fine in the cms, i can create a blogholder and modify the settings etc.

    However when i navigate to the blog page on my site i get the following error. Have done a db/build/?flush=1 and flushed the site. Any ideas???

    *************************************************************************

    [Warning] file_get_contents() [function.file-get-contents]: Filename cannot be empty
    GET /pixelchildv2/blog/

    Line 277 in C:\xampp\htdocs\pixelchildv2\sapphire\core\SSViewer.php
    Source

    268    /**
    269     * Used by <% include Identifier %> statements to get the full
    270     * unparsed content of a template file.
    271     *
    272     * @uses getTemplateFile()
    273     * @param string $identifier A template name without '.ss' extension or path.
    274     * @return string content of template
    275     */
    276    public static function getTemplateContent($identifier) {
    277       return file_get_contents(SSViewer::getTemplateFile($identifier));
    278    }
    279    
    280    /**
    281     * @ignore
    282     */
    283    static private $flushed = false;

    *******************************************************************************

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Please help installation probs, cant find template file Link to this post

    perhaps try wrapping that in a file_exists so that it doesn't call it if it doesn't exist

    return (file_exists(SSViewer::getTemplateFile($identifier)) ? file_get_contents(SSViewer::getTemplateFile($identifier)) : false;

  • b0bro
    Avatar
    Community Member
    38 Posts

    Re: Please help installation probs, cant find template file Link to this post

    Thank you, that worked!

    864 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.