Jump to:

1347 Posts in 439 Topics by 514 members

Themes

SilverStripe Forums » Themes » Trouble with bootstrap theme and feature page

Discuss SilverStripe Themes.

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

Page: 1
Go to End
Author Topic: 1517 Views
  • ChronicD
    Avatar
    Community Member
    2 Posts

    Trouble with bootstrap theme and feature page Link to this post

    Hello,

    Well i am working with silverstripe 3.1.x beta3 as i want to work with the latest code changes. However this may be my downfall as i have installed the bootstrap theme to use as the base for my new site Prepper.

    the problem i have is that once installed when i try to create a featurepage under the heropage it gives me this when i run ?flush=1.

    [User Deprecated] SSTemplateParser->ClosedBlock_Handle_Control is deprecated. is deprecated. Use or instead. Called from SSTemplateParser->ClosedBlock__finalise.
    GET /SS_Prepper/?flush=1

    Line 172 in /Applications/MAMP/htdocs/SS_Prepper/framework/dev/Deprecation.php
    Source

    163          $level = self::$notice_level;
    164          if (!$level) $level = E_USER_DEPRECATED;
    165
    166          // Then raise the notice
    167          if(substr($string,-1) != '.') $string .= ".";
    168
    169          $string .= " Called from " . self::get_called_method_from_trace($backtrace, 2) . '.';
    170
    171          if($caller) {
    172             user_error($caller.' is deprecated.'.($string ? ' '.$string : ''), $level);   
    173          } else {
    174             user_error($string, $level);   
    175          }
    176          
    177       }
    178    }

    Trace

    SSTemplateParser->ClosedBlock_Handle_Control is deprecated. <% control %> is deprecated. Use <% with %> or <% loop %> instead. Called from SSTemplateParser->ClosedBlock__finalise.
    Deprecation.php:172
    Deprecation::notice(3.1,<% control %> is deprecated. Use <% with %> or <% loop %> instead.)
    SSTemplateParser.php:3627
    SSTemplateParser->ClosedBlock_Handle_Control(Array)
    SSTemplateParser.php:3588
    SSTemplateParser->ClosedBlock__finalise(Array)
    call_user_func_array(Array,Array)
    Parser.php:139
    Parser->finalise(Array)
    SSTemplateParser.php:3548
    SSTemplateParser->match_ClosedBlock(Array)
    SSTemplateParser.php:197
    SSTemplateParser->match_Template(Array)
    SSTemplateParser.php:1520
    SSTemplateParser->match_IfPart(Array)
    SSTemplateParser.php:1623
    SSTemplateParser->match_If(Array)
    SSTemplateParser.php:125
    SSTemplateParser->match_Template(Array)
    SSTemplateParser.php:3525
    SSTemplateParser->match_ClosedBlock(Array)
    SSTemplateParser.php:4165
    SSTemplateParser->match_TopTemplate()
    SSTemplateParser.php:4587
    SSTemplateParser::compileString(<!DOCTYPE html> <html lang="en"> <head> <% base_tag %> $MetaTags(false) <meta charset="utf-8"> <title>$Title | Bootstrap Theme</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <% require themedCSS(bootstrap) %> <style type="text/css"> body { padding-top: 60px; padding-bottom: 40px; } </style> <% require themedCSS(bootstrap-responsive) %> <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <!-- Le fav and touch icons --> <link rel="shortcut icon" href="images/favicon.ico"> <link rel="apple-touch-icon" href="images/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png"> </head> <body> <div class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <!-- Uncomment to enable search --> <!--$SearchForm--> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <a class="brand" href="/">Toowoomba City</a> <% if Menu(1) %> <div class="nav-collapse"> <ul class="nav"> <% control Menu(1) %> <li class="$LinkingMode"><a href="$Link" title="Go to $Title">$MenuTitle</a></li> <% end_control %> </ul> </div><!--/.nav-collapse --> <% end_if %> </div> </div> </div> <div class="container"> $Layout <hr> <footer> <p>&copy; Company $Now.Year | <!-- Thanks for linking back --> <a href="/admin/">Login</a> | Silverstripe Bootstrap Theme by <a href="/">Visit Toowoomba</a></p> </footer> </div> <!-- /container --> <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script src="$ThemeDir/js/jquery.js"></script> <script src="$ThemeDir/js/bootstrap-transition.js"></script> <script src="$ThemeDir/js/bootstrap-alert.js"></script> <script src="$ThemeDir/js/bootstrap-modal.js"></script> <script src="$ThemeDir/js/bootstrap-dropdown.js"></script> <script src="$ThemeDir/js/bootstrap-scrollspy.js"></script> <script src="$ThemeDir/js/bootstrap-tab.js"></script> <script src="$ThemeDir/js/bootstrap-tooltip.js"></script> <script src="$ThemeDir/js/bootstrap-popover.js"></script> <script src="$ThemeDir/js/bootstrap-button.js"></script> <script src="$ThemeDir/js/bootstrap-collapse.js"></script> <script src="$ThemeDir/js/bootstrap-carousel.js"></script> <script src="$ThemeDir/js/bootstrap-typeahead.js"></script> </body> </html> ,/Applications/MAMP/htdocs/SS_Prepper/themes/bootstrap/templates/Page.ss,)
    SSViewer.php:1032
    SSViewer::parseTemplateContent(<!DOCTYPE html> <html lang="en"> <head> <% base_tag %> $MetaTags(false) <meta charset="utf-8"> <title>$Title | Bootstrap Theme</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <% require themedCSS(bootstrap) %> <style type="text/css"> body { padding-top: 60px; padding-bottom: 40px; } </style> <% require themedCSS(bootstrap-responsive) %> <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <!-- Le fav and touch icons --> <link rel="shortcut icon" href="images/favicon.ico"> <link rel="apple-touch-icon" href="images/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png"> </head> <body> <div class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <!-- Uncomment to enable search --> <!--$SearchForm--> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <a class="brand" href="/">Toowoomba City</a> <% if Menu(1) %> <div class="nav-collapse"> <ul class="nav"> <% control Menu(1) %> <li class="$LinkingMode"><a href="$Link" title="Go to $Title">$MenuTitle</a></li> <% end_control %> </ul> </div><!--/.nav-collapse --> <% end_if %> </div> </div> </div> <div class="container"> $Layout <hr> <footer> <p>&copy; Company $Now.Year | <!-- Thanks for linking back --> <a href="/admin/">Login</a> | Silverstripe Bootstrap Theme by <a href="/">Visit Toowoomba</a></p> </footer> </div> <!-- /container --> <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script src="$ThemeDir/js/jquery.js"></script> <script src="$ThemeDir/js/bootstrap-transition.js"></script> <script src="$ThemeDir/js/bootstrap-alert.js"></script> <script src="$ThemeDir/js/bootstrap-modal.js"></script> <script src="$ThemeDir/js/bootstrap-dropdown.js"></script> <script src="$ThemeDir/js/bootstrap-scrollspy.js"></script> <script src="$ThemeDir/js/bootstrap-tab.js"></script> <script src="$ThemeDir/js/bootstrap-tooltip.js"></script> <script src="$ThemeDir/js/bootstrap-popover.js"></script> <script src="$ThemeDir/js/bootstrap-button.js"></script> <script src="$ThemeDir/js/bootstrap-collapse.js"></script> <script src="$ThemeDir/js/bootstrap-carousel.js"></script> <script src="$ThemeDir/js/bootstrap-typeahead.js"></script> </body> </html> ,/Applications/MAMP/htdocs/SS_Prepper/themes/bootstrap/templates/Page.ss)
    SSViewer.php:969
    SSViewer->process(HeroPage_Controller)
    Controller.php:203
    Controller->handleAction(SS_HTTPRequest,index)
    RequestHandler.php:200
    RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
    Controller.php:153
    Controller->handleRequest(SS_HTTPRequest,DataModel)
    ContentController.php:203
    ContentController->handleRequest(SS_HTTPRequest,DataModel)
    ModelAsController.php:68
    ModelAsController->handleRequest(SS_HTTPRequest,DataModel)
    RootURLController.php:129
    RootURLController->handleRequest(SS_HTTPRequest,DataModel)
    Director.php:325
    Director::handleRequest(SS_HTTPRequest,Session,DataModel)
    Director.php:143
    Director::direct(/,DataModel)
    main.php:128

    I am 99% sure the problem is with the theme so my question is has anyone else come across this problem and if so if they manage to fix it how did they do it?

    Otherwise I am open to suggestions for another twitter bootstrap based solution (have used unclecheese forms module in another project with an edited simple theme - so can always go back to that) Just thought id have a look at another theme as a base start.

    PS I have a background in architecture and am css and html literate and a newbie php and js coder so please take this into account when replying.

    Thank you
    Dan

  • Bambii7
    Avatar
    Community Member
    254 Posts

    Re: Trouble with bootstrap theme and feature page Link to this post

    Hi Dan,
    Can't say I've encountered that issue before. This Bootstrap theme, is it one provided by the community? If so it might be a SS 2.4 template.

    I agree the issue looks like its in the template not the 3.1.x beta but for a live site you should stick with the latest stable release, unless you can follow along with the release changelog and need/trust the modifications.

  • ChronicD
    Avatar
    Community Member
    2 Posts

    Re: Trouble with bootstrap theme and feature page Link to this post

    Hi there,

    Thanks for the response, i have downloaded the SS Bootstrap theme that is 3.x compatible, the developer of the other theme got in touch and explained the theme was for 2.4, which was not in any of the explanations/documentation.

    So i suppose the problem is resolved however i did like how he made the hero page/feature sub page work in tandem so that an excerpt of the feature page was pulled through to the hero (primary) page. I will still look through the theme and see if i can understand how this works an if i could transfer it into some 3.x page types.

    If the theme was on the website (http://www.silverstripe.org/twitter-bootstrap-theme/) does that mean its from the community? sorry i should have posted that link before.

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