Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Theme errors in 2.2

meshugymeshugy Musician/Hacker ✭✭

I have a custom Vanilla theme that the author of my shopping cart software designed which cleverly exports the theme of my shoppingcart and integrates Vanilla into it (see: www.djangobooks.com/forum). However, upon testing Vanilla 2.2 I realized this theme is no longer compatible. Any help on what I need to change to make it work would be much appreciated. The main error I'm getting is

Smarty error: [in /home/gypsypicking/djangobooks.com/testforum/themes/kryptronic/views/default.master.tpl line 1]: syntax error: unrecognized tag 'kryptronicstartup' (Smarty_Compiler.class.php, line 590)

I attached the full error report. Let me know if anyone has any ideas on what I can do to fix this, thanks!

Comments

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Make sure the tpl starts with this

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
    
        {asset name='Head'}
    
    
      </head>
    

    All themes are compatible with 2.2 if they worked on 2.1 get that in your head. This is not like the update from 2.0 where the architecture changed. If your theme worked in 2.1 it works in 2.2 unless you messed it up somehow by adding weird stuff.

    Just get a tpl from the default theme or another theme and test it again.

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    @vrijvlinder thanks....I tried that but it didn't work, same error. I'm trying to figure out of there is something other than theme folder I need to copy over to make this custom theme work.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Has to have an about.php with the name of the theme properly written and any other files it used. It could also be an incomplete upload. Make sure you have a Smarty folder in the cache with the compile file inside.

    Syntax error can mean code spelling error somewhere. A missing comma or an extra bracket ... Check the config.php to make sure the name of the enabled theme is right.

    Post the contents of the tpl and the about.php for your theme

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    @vrijvlinder I do have an about.php file.

    I realized my theme had a folder called "functions" in it which included the file kryptronicstartup.php that is referenced in the error. I copied all the files in the "functions" folder to: library/vendors/smartyplugins

    Still no joy

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    Here's my TPL file:

    {kryptronicstartup}
    
    {kryptroniccssjs}
    
    {asset name='Head'}
    
    {kryptronicprebody}
    
    <body id="{$BodyID}" class="{$BodyClass}">
    
    {kryptronicprecontent}
    
    <div id="Head">
    
    <ul class="SiteMenu">
    {dashboard_link}
    {discussions_link}
    {activity_link}
    {inbox_link}
    {custom_menu}
    {profile_link}
    {signinout_link}
    </ul>
    
    <div class="SiteSearch">{searchbox placeholder="Search Forums"}</div>
    
    </div>
    
    <div id="Body">
    
    <div class="BreadcrumbsWrapper P">{breadcrumbs}</div>
    
    <div class="Column PanelColumn" id="Panel">
    {module name="MeModule" CssClass="FlyoutRight"}
    {asset name="Panel"}
    </div>
    
    <div class="Column ContentColumn" id="Content">{asset name="Content"}</div>
    
    <div class="clearboth"></div>
    </div>
    
    <div id="Foot">{asset name="Foot"}</div>
    
    {event name="AfterBody"}
    
    {kryptronicpostcontent}
    
  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Actually I don't think that is where you needed to add the functions file since that would certainly affect the core.

    The tpl needs to start as the example I posted above. There needs to be a document type etc, unless you failed to post that part for some reason, but the html you posted seems wrong.

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        {asset name='Head'}
        {kryptronicstartup}
        {kryptroniccssjs}
    
      </head>
    
  • Options
    meshugymeshugy Musician/Hacker ✭✭
    edited February 2016

    @vrijvlinder The tpl worked fine as is for years with previous versions of Vanilla so I'm not sure why I'd have to change it now. My guess is something else is problem....obviously related to smarty which I know nothing about.

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    If you have found that functions folder only know, are you sure you now have copied the complete folder? Make sure you didn't miss a file called something like ...themehooks.php

    Also there might be a bootstrap.before.php file in your old installations conf folder that you would need to copy

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    ok, I figured out what the problem is. This special theme needs file called kryptronicstartup.php in the root of the forum. Now it works, =)

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    @meshugy said:
    ok, I figured out what the problem is. This special theme needs file called kryptronicstartup.php in the root of the forum. Now it works, =)

    AHA!! thanks for proving me right yet again ... I thought it sounded wacky tobacky to put that in the smarty library ... And that when something does not work it is usually self inflicted... !!

    And that compatibility issues are exaggerated... I am glad you persevered and got it to work !! Mazal Tov Meshuga!!

Sign In or Register to comment.