I am completely new to SilverStripe, so the possiblity that I do something wrong is high ;-), anyway I have a problem to integrate a blog into a template:
I have a template "Aktuelles.ss" and tried to extend the BlogHolder/Controller class:
<?php
class Aktuelles extends BlogHolder {
}
class Aktuelles_Controller extends BlogHolder_Controller {
}
?>
In my file Aktuelles.ss I try to use the blog:
<div id="subcontent">
<div class="small picturebox textcenter"><img src="/themes/wagnerecht/images/tanja_klein.jpg"><strong>RAin Tanja Wagner</strong></div>
<div class="small picturebox textcenter"><img src="/themes/wagnerecht/images/anwaltsvlogo.jpg"></div>
</div>
<div id="content">
<h1>$Title</h1>
<% include BlogSideBar %>
<div id="BlogContent" class="blogcontent typography">
<% include BreadCrumbs %>
<% if Tag %>
<h3><% _t('VIEWINGTAGGED', 'Viewing entries tagged with') %> '$Tag'</h3>
<% end_if %>
<% if BlogEntries %>
<% control BlogEntries %>
<% include BlogSummary %>
<% end_control %>
<% else %>
<h3><% _t('NOENTRIES', 'There are no blog entries') %></h3>
<% end_if %>
<% include BlogPagination %>
</div>
</div>
Now the blog is shown, but I also get internationalization errors (the site is in german):
Notice: Undefined index: Action in C:\projects\tanja\env\wamp2f\www\silverstripe\sapphire\core\control\Director.php on line 219
Notice: Array to string conversion in C:\projects\tanja\env\wamp2f\www\silverstripe\sapphire\core\control\Director.php on line 358
FATAL ERROR: i18n::include_by_class: Class Aktuelles.ss not found
At line 1259 in C:\projects\tanja\env\wamp2f\www\silverstripe\sapphire\core\i18n.php
user_error(i18n::include_by_class: Class Aktuelles.ss not found,512)
line 1259 of i18n.php
i18n::include_by_class(Aktuelles.ss)
line 132 of Core.php
_t(Aktuelles.ss.VIEWFULL,View full post titled -)
line 61 of .cacheC..projects.tanja.env.wamp2f.www.silverstripe.themes.wagnerecht.templates.Layout.Aktuelles.ss
include(C:\WINXP\Temp\silverstripe-cacheC--projects-tanja-env-wamp2f-www-silverstripe\.cacheC..projects.tanja.env.wamp2f.www.silverstripe.themes.wagnerecht.templates.Layout.Aktuelles.ss)
line 197 of SSViewer.php
SSViewer->process(Aktuelles_Controller)
line 189 of SSViewer.php
SSViewer->process(Aktuelles_Controller)
line 296 of Controller.php
Controller->defaultAction(index)
line 279 of BlogHolder.php
BlogHolder_Controller->defaultAction(index,Array)
line 267 of Controller.php
Controller->run(Array)
line 22 of ModelAsController.php
ModelAsController->run(Array)
line 27 of RootURLController.php
RootURLController->run(Array)
line 104 of Director.php
Director::direct(/)
line 158 of main.php
Context
Debug (Debug::showError() in line 180 of Debug.php)
* class =
Aktuelles.ss
* module =
Notice: Array to string conversion in C:\projects\tanja\env\wamp2f\www\silverstripe\sapphire\core\control\Director.php on line 358
FATAL ERROR: i18n::include_by_class: Class Aktuelles.ss not found
At line 1259 in C:\projects\tanja\env\wamp2f\www\silverstripe\sapphire\core\i18n.php
user_error(i18n::include_by_class: Class Aktuelles.ss not found,512)
line 1259 of i18n.php
i18n::include_by_class(Aktuelles.ss)
line 132 of Core.php
_t(Aktuelles.ss.POSTEDBY,Posted by)
line 74 of .cacheC..projects.tanja.env.wamp2f.www.silverstripe.themes.wagnerecht.templates.Layout.Aktuelles.ss
include(C:\WINXP\Temp\silverstripe-cacheC--projects-tanja-env-wamp2f-www-silverstripe\.cacheC..projects.tanja.env.wamp2f.www.silverstripe.themes.wagnerecht.templates.Layout.Aktuelles.ss)
line 197 of SSViewer.php
SSViewer->process(Aktuelles_Controller)
line 189 of SSViewer.php
SSViewer->process(Aktuelles_Controller)
line 296 of Controller.php
Controller->defaultAction(index)
line 279 of BlogHolder.php
BlogHolder_Controller->defaultAction(index,Array)
line 267 of Controller.php
Controller->run(Array)
line 22 of ModelAsController.php
ModelAsController->run(Array)
line 27 of RootURLController.php
RootURLController->run(Array)
line 104 of Director.php
Director::direct(/)
line 158 of main.php
Context
Debug (Debug::showError() in line 180 of Debug.php)
* class =
Aktuelles.ss
* module =
Notice: Array to string conversion in C:\projects\tanja\env\wamp2f\www\silverstripe\sapphire\core\control\Director.php on line 358
FATAL ERROR: i18n::include_by_class: Class Aktuelles.ss not found
At line 1259 in C:\projects\tanja\env\wamp2f\www\silverstripe\sapphire\core\i18n.php
user_error(i18n::include_by_class: Class Aktuelles.ss not found,512)
line 1259 of i18n.php
i18n::include_by_class(Aktuelles.ss)
line 132 of Core.php
_t(Aktuelles.ss.POSTEDON,on)
line 82 of .cacheC..projects.tanja.env.wamp2f.www.silverstripe.themes.wagnerecht.templates.Layout.Aktuelles.ss
include(C:\WINXP\Temp\silverstripe-cacheC--projects-tanja-env-wamp2f-www-silverstripe\.cacheC..projects.tanja.env.wamp2f.www.silverstripe.themes.wagnerecht.templates.Layout.Aktuelles.ss)
line 197 of SSViewer.php
SSViewer->process(Aktuelles_Controller)
line 189 of SSViewer.php
SSViewer->process(Aktuelles_Controller)
line 296 of Controller.php
Controller->defaultAction(index)
line 279 of BlogHolder.php
BlogHolder_Controller->defaultAction(index,Array)
line 267 of Controller.php
Controller->run(Array)
line 22 of ModelAsController.php
ModelAsController->run(Array)
line 27 of RootURLController.php
RootURLController->run(Array)
line 104 of Director.php
Director::direct(/)
line 158 of main.php
Context
Debug (Debug::showError() in line 180 of Debug.php)
* class =
Aktuelles.ss
* module =
Notice: Array to string conversion in C:\projects\tanja\env\wamp2f\www\silverstripe\sapphire\core\control\Director.php on line 358
FATAL ERROR: i18n::include_by_class: Class Aktuelles.ss not found
At line 1259 in C:\projects\tanja\env\wamp2f\www\silverstripe\sapphire\core\i18n.php
user_error(i18n::include_by_class: Class Aktuelles.ss not found,512)
line 1259 of i18n.php
i18n::include_by_class(Aktuelles.ss)
line 132 of Core.php
_t(Aktuelles.ss.COMMENTS,Comments)
line 98 of .cacheC..projects.tanja.env.wamp2f.www.silverstripe.themes.wagnerecht.templates.Layout.Aktuelles.ss
include(C:\WINXP\Temp\silverstripe-cacheC--projects-tanja-env-wamp2f-www-silverstripe\.cacheC..projects.tanja.env.wamp2f.www.silverstripe.themes.wagnerecht.templates.Layout.Aktuelles.ss)
line 197 of SSViewer.php
SSViewer->process(Aktuelles_Controller)
line 189 of SSViewer.php
SSViewer->process(Aktuelles_Controller)
line 296 of Controller.php
Controller->defaultAction(index)
line 279 of BlogHolder.php
BlogHolder_Controller->defaultAction(index,Array)
line 267 of Controller.php
Controller->run(Array)
line 22 of ModelAsController.php
ModelAsController->run(Array)
line 27 of RootURLController.php
RootURLController->run(Array)
line 104 of Director.php
Director::direct(/)
line 158 of main.php
Context
Debug (Debug::showError() in line 180 of Debug.php)
* class =
Aktuelles.ss
* module =
So the question is, do I somthing wrong? Is there a problem with internationalization?
Thanks for the help,
Marcel