Kubrik Theme index.tpl file broken.

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
meritweb
Regular
Posts: 43
Joined: Fri Jan 25, 2008 3:40 am

Kubrik Theme index.tpl file broken.

Post by meritweb »

Please help me. I wanted to add some tracking scripts to our blog in order to allow us to track our visitors to those pages. I had no clue what I was doing, but added it to the bottom of the index.tpl file in our Kubrik theme. After I saved, the blog only comes up blank white. I undid my changes and resaved the file, yet I still am just getting blank pages.

Please let me know what I need to do to get our blog back online. The address is http://www.meritsolutions.com/meritmatters/

The code in our index.tpl file is below:

Code: Select all

{if $is_embedded != true}
{if $is_xhtml}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{else}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
           "http://www.w3.org/TR/html4/loose.dtd">
{/if}

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang}" lang="{$lang}">
<head>
    <title>{$head_title|@default:$blogTitle} {if $head_subtitle} - {$head_subtitle}{/if}</title>
    <meta http-equiv="Content-Type" content="text/html; charset={$head_charset}" />
    <meta name="Powered-By" content="Serendipity v.{$head_version}" />
    <link rel="stylesheet" type="text/css" href="{$head_link_stylesheet}" />
    <link rel="alternate"  type="application/rss+xml" title="{$blogTitle} RSS feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/index.rss2" />
    <link rel="alternate"  type="application/x.atom+xml"  title="{$blogTitle} Atom feed"  href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/atom.xml" />
{if $entry_id}
    <link rel="pingback" href="{$serendipityBaseURL}comment.php?type=pingback&entry_id={$entry_id}" />
{/if}

{serendipity_hookPlugin hook="frontend_header"}
</head>

<body>
{else}
{serendipity_hookPlugin hook="frontend_header"}
{/if}
<div id="page">
<div id="header" onclick="location.href='{$serendipityBaseURL}';" style="cursor: pointer;">
    <div id="headerimg">
        <h1>{$head_title|@default:$blogTitle}</h1>
        <div class="description">{$head_subtitle|@default:$blogDescription}</div>
    </div>
</div>
<hr />

<div id="content" class="narrowcolumn">
    {$CONTENT}
</div>

{if $rightSidebarElements > 0}
    <div id="sidebar">
    {serendipity_printSidebar side="right"}
    {serendipity_printSidebar side="left"}
    </div>
{/if}

<hr />
<div id="footer">
    <p>
    {$CONST.PROUDLY_POWERED_BY} <a href="http://www.s9y.org">Serendipity {$serendipityVersion}</a>.<br />
    Design is <a href="http://binarybonsai.com/kubrick/">Kubrick</a>, by Michael Heilemann, ported by <a href="http://blog.dreamcoder.dk">Tom Sommer</a>.
    </p>
</div>

</div>
{serendipity_hookPlugin hook="frontend_footer"}
{if $is_embedded != true}
</body>
</html>
{/if}
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Kubrik Theme index.tpl file broken.

Post by Timbalu »

Hmm that is a white page of death. You will find infos of the cause, if you have a look into the error.log of your server. Ask your ISP to send you the latest entries.

Kubrick does not seem to exist any more. So I can not point you to an exiting download. But I found the kubrick 1.26 port somewhere else, http://www.sourcexref.com/xref/serendip ... ource.html. You could compare it with the one you pasted, to get rid of any errors you did when purging the changes you made to it.

If you get it running again, I would recommend to change the template to a supported one.

Oh wait... I found an existing one in a Serendipity 1.6 release

Code: Select all

{if $is_embedded != true}
{if $is_xhtml}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{else}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
           "http://www.w3.org/TR/html4/loose.dtd">
{/if}

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang}" lang="{$lang}">
<head>
    <title>{$head_title|@default:$blogTitle} {if $head_subtitle} - {$head_subtitle}{/if}</title>
    <meta http-equiv="Content-Type" content="text/html; charset={$head_charset}" />
    <meta name="Powered-By" content="Serendipity v.{$head_version}" />
    <link rel="stylesheet" type="text/css" href="{$head_link_stylesheet}" />
    <link rel="alternate"  type="application/rss+xml" title="{$blogTitle} RSS feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/index.rss2" />
    <link rel="alternate"  type="application/x.atom+xml"  title="{$blogTitle} Atom feed"  href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/atom.xml" />
{if $entry_id}
    <link rel="pingback" href="{$serendipityBaseURL}comment.php?type=pingback&entry_id={$entry_id}" />
{/if}

{serendipity_hookPlugin hook="frontend_header"}
</head>

<body>
{else}
{serendipity_hookPlugin hook="frontend_header"}
{/if}
<div id="page">
<div id="header" onclick="location.href='{$serendipityBaseURL}';" style="cursor: pointer;">
    <div id="headerimg">
        <h1>{$head_title|@default:$blogTitle}</h1>
        <div class="description">{$head_subtitle|@default:$blogDescription}</div>
    </div>
</div>
<hr />

<div id="content" class="narrowcolumn">
    {$CONTENT}
</div>

{if $rightSidebarElements > 0}
    <div id="sidebar">
    {serendipity_printSidebar side="right"}
    {serendipity_printSidebar side="left"}
    </div>
{/if}

<hr />
<div id="footer">
    <p>
    {$CONST.PROUDLY_POWERED_BY} <a href="http://www.s9y.org">Serendipity {$serendipityVersion}</a>.<br />
    Design is <a href="http://binarybonsai.com/kubrick/">Kubrick</a>, by Michael Heilemann, ported by <a href="http://blog.dreamcoder.dk">Tom Sommer</a>.
    </p>
</div>

</div>
{serendipity_hookPlugin hook="frontend_footer"}
{if $is_embedded != true}
</body>
</html>
{/if}
Drop this to your index file and see if that changes something.

But on a quick comparison it looks quite the same... you still might need to view the log file.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
meritweb
Regular
Posts: 43
Joined: Fri Jan 25, 2008 3:40 am

Re: Kubrik Theme index.tpl file broken.

Post by meritweb »

Thanks for the assistance Ian. Dropping the new code in did not do anything.

Can I simply switch to a different theme and it would start working again on a different theme?
meritweb
Regular
Posts: 43
Joined: Fri Jan 25, 2008 3:40 am

Re: Kubrik Theme index.tpl file broken.

Post by meritweb »

Here's what the Error Log tells me:

[Wed Jul 03 11:52:24 2013] [error] [client 70.197.204.65] File does not exist: /home/meritweb/public_html/meritmatters/index.html
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Kubrik Theme index.tpl file broken.

Post by Timbalu »

Yes, log-in and change the theme http://www.meritsolutions.com/meritmatt ... _admin.php

Uhhhh your are still using Serendipity 1.1.2... :shock:
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
meritweb
Regular
Posts: 43
Joined: Fri Jan 25, 2008 3:40 am

Re: Kubrik Theme index.tpl file broken.

Post by meritweb »

Thanks Ian. I made the change to another theme.

We haven't upgraded because, as I have already noted, I don't know what to do and I am afraid I'll break everything. I see the download file "serendipity-1.7.tar.gz", but I have no clue what to do with it from there.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Kubrik Theme index.tpl file broken.

Post by Timbalu »

Are you sure you really dropped the index.tpl into the right kubrick theme folder?
The change to index.html is done by the htaccess file, I presume, and this should not matter if the htaccess is being processed.

Upgrading should normally do, but in in real life this is somehow complicated in some cases. :wink: in special if upgrading systems < 1.2.
Read the Serendipity blog http://blog.s9y.org/ about issues before and this http://www.s9y.org/11.html#A19 and that http://www.s9y.org/11.html#A15 .

Make a backup of your Serendipity system and the database before (for the case an upgrade can't get managed successfully.

Run plugin upgrades and set configuration → path → autodetect host name to yes, (due to a bug, with upgrade to 1.7 only).

Then unzip the tar.gz or the zip and upload all files and dirs in serendipity to your meritmatters/ folder by ftp or the shell. Point yourself to the normal frontpage and the upgrading process starts, checking permissions, and wanting you to run the updates for the database (auto recommended).
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
meritweb
Regular
Posts: 43
Joined: Fri Jan 25, 2008 3:40 am

Re: Kubrik Theme index.tpl file broken.

Post by meritweb »

Here's exactly what I did:

I opened up Microsoft Expression Web, my normal HTML / WYSIWYG, and browsed through the folder structure to the Kubrick index.tpl file and opened it. We've been using this theme from the very beginning, so it was not a new implementation. It has been working great for 3 years. We recently added a site tracking tool, and since our blog generates most of our traffic, I wanted the code to be on all our blog pages.

I copied the HTML code snippet from our tracking tool, and I pasted it in the HTML code just before the </body> tag on the index.tpl file. I clicked save and opened the blog. I got the white screen of nothing - so I went back to Expression Web, hit undo until the file was back to it's original state, and clicked save again. When I opened the blog again, nothing changed. I cleared my cache, accessed the page from multiple devices / browsers - and it was the same result for all of them.

That's when I came on here looking for help. I found the original index.tpl code from a page online, and you sent some code to me as well. I tried plugging these into the html code in Expression Web, but neither made any changes.

So I now switched to a new design - but I'd love to go back to the old one if possible. I have asked our hosting provider if they have any snapshots of the page before I made my changes. Hopefully they can just roll that file back to before I opened it.

Thanks again for your help.
meritweb
Regular
Posts: 43
Joined: Fri Jan 25, 2008 3:40 am

Re: Kubrik Theme index.tpl file broken.

Post by meritweb »

Ideally I'd LOVE to just insert the code snippet into our main website design - so our blog looks and feels like the rest of our website (with the same header, footer, etc...) - but I am assuming we would need an outside person to come help us with that because I wouldn't know where to begin.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Kubrik Theme index.tpl file broken.

Post by Timbalu »

meritweb wrote:I went back to Expression Web, hit undo until the file was back to it's original state, and clicked save again. When I opened the blog again, nothing changed.
I don't know that tools, ...it looks like the successor of MS Frontpage, which was awful.
It seems this tools brought in the error, or changed .tpl to .html - which would not wonder me being a MS tool. :wink:

Use a better editor (like notepad++ http://notepad-plus-plus.org/) and upload the changed file via FTP or equal.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Kubrik Theme index.tpl file broken.

Post by Timbalu »

Just as a tip, if you need to insert that (javascript) tracking script into index.tpl, do not forget to use {ldelim} and {rdelim} for each { or }, or enclose the whole script part with {literal} ... {/literal}. With Serendipity 1.7/Smarty3 you would only need an added whitespace to these curley brackets.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
meritweb
Regular
Posts: 43
Joined: Fri Jan 25, 2008 3:40 am

Re: Kubrik Theme index.tpl file broken.

Post by meritweb »

This does bring me back to my original question.

I want to place a <script> in the HTML code of all of our blog pages. I'm assuming now that I need to use a plain text editor to drip my <script></script> into the HTML code before the </body> tag. Do I do this in the index.tpl file?

Thanks!
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Kubrik Theme index.tpl file broken.

Post by Timbalu »

Yes, right there. Example:

Code: Select all

....
<script>
var _gaq=[['_setAccount','{$template_option.google_id}'],['_gat._anonymizeIp'],['_trackPageview'],['_trackPageLoadTime']];
(function(d,t){ldelim}var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s){rdelim}(document,'script'));
</script>

 </body>

</html>
{/if}
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply