[SOLVED] Templates breaking up

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
leximus
Forum Members
Forum Members
Posts: 51
Joined: Fri Oct 20, 2006 8:57 pm

[SOLVED] Templates breaking up

Post by leximus »

Hi,

I'm currently getting a bug for which I cannot find any explanation... I've been developing my site now for many weeks on my Wamp 2.0 Server on Win7. Everything worked fine so far, but now, I'm getting a very curious bug. Both templates, admin and frontend aren't displaying correctly anymore and I didn't make any changes to these templates and their stylesheets at this time...
In Firefox nearly everything seems correct, but the template seems vertically centered to me, which it wasn't in the beginning.
Now for IE, templates break up totally, as can bee seen in the image of the admin template I uploaded.
Admin template in IE.
Admin template in IE.
I didn't do any changes at all to this template... Same stuff for the frontend template.
I can't find a problem in the source code of the admin template either:

<!doctype html>
<__html>
<head>
<meta charset="UTF-8" />
<title>Login to CMS Made Simple&trade; - Groupe Animateur Asbl</title>
<base href="http://localhost/ga/adminx/" />
<meta name="generator" content="CMS Made Simple - Copyright (C) 2004-12 Ted Kulp. All rights reserved." />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="initial-scale=1.0 maximum-scale=1.0 user-scalable=no" />
<meta name="HandheldFriendly" content="True"/>
<link rel="shortcut icon" href="http://localhost/ga/adminx/themes/OneEl ... icon.ico"/>
<link rel="stylesheet" href="loginstyle.php" />
<!-- learn IE html5 -->
<!--[if lt IE 9]>
<__script__ src="http://html5shiv.googlecode.com/svn/tru ... "></__script>
<![endif]-->
<__script__ type="text/javascript" src="http://localhost/ga/lib/jquery/js/jquer ... "></__script>
<__script__ type="text/javascript" src="http://localhost/ga/lib/jquery/js/jquer ... "></__script>
<__script__ type="text/javascript" src="http://localhost/ga/adminx/themes/OneEl ... "></__script>

</head>
</__body id="login">
<div id="wrapper">
<div class="login-container">
<div class="login-box cf">
<div class="logo">
<img src="http://localhost/ga/adminx/themes/OneEl ... n_logo.png" width="180" height="36" alt="CMS Made Simple&trade;" />
</div>
<div class="info-wrapper open">
<aside class="info">
<h2>Information</h2>
<p>For the Admin console to work properly</p>
<ol>
<li>Cookies must be enabled in your browser</li>
<li>Javascript must be enabled in your browser</li>
<li>Popup windows must be allowed for the following address:</li>
</ol>
<p><strong>(localhost)</strong></p>
<p class="warning">Warning: Admin activities use cookies and tracks your IP address</p>
</aside>
<a href="#" title="Open/Close" class="toggle-info">Open/Close</a>
</div>
<header>
<h1>Login to CMS Made Simple&trade;</h1>
</header>
<form method="post" action="login.php">
<fieldset>
<label for="lbusername">Username</label>
<input id="lbusername" class="focus" placeholder="Username" name="username" type="text" size="15" value="" />
<label for="lbpassword">Password</label>
<input id="lbpassword" class="focus" placeholder="Password" name="password" type="password" size="15" />
<input class="loginsubmit" name="loginsubmit" type="submit" value="Submit" />
<input class="loginsubmit" name="logincancel" type="submit" value="Cancel" />
</fieldset>
</form>
<a href="http://localhost/ga" title="Back to: Groupe Animateur Asbl"> <img class="goback" width="16" height="16" src="http://localhost/ga/adminx/themes/OneEl ... goback.png" alt="Back to: Groupe Animateur Asbl" /> </a>
<p class="forgotpw">
<a href="login.php?forgotpw=1">Forgot your password?</a>
</p>
</div>
<footer>
<small class="copyright">Copyright &copy; <a rel="external" href="http://www.cmsmadesimple.org">CMS Made Simple&trade;</a></small>
</footer>
</div>
</div>
<__body>
</__html>
So I'm really desperate and don't know what I did wrong... I already had this bug some time ago, and then I used a dump file of my database which I created just one day before and everything was fine again. So after that, I've started creating lots of dump files as I proceed and paid attention if the bug appeared again. And it didn't until now and as I tried to recover the page again from a dump file, it persisted until I took a file I created one month ago... And I'm sure the bug didn't appear in earlier files before...

So any help would really be highly appreciated as I'm really not getting behind it right now... Here's the system information:
CMS Version 1.11.2

Installed Modules
CMSMailer 5.2.1
FCKeditorX 1.1.0
MenuManager 1.8.4
ModuleManager 1.5.5
News 2.12.9
Search 1.7.7
ThemeManager 1.1.7
AkismetCheck 0.2.1
Bookmarks 2.0.1
Backup 0.5
VisitorStats 0.2.2
NMS 2.5.6
pisearch 1.72
FileManager 1.4.1
Printing 1.1.2
CGExtensions 1.30
FormBuilder 0.7.3
Captcha 0.4.5
VisitorStats 0.2.2
Statistics 1.1.3
Gallery 1.6
CGCalendar 1.10.0.1
CGSimpleSmarty 1.5.2
CGGoogleMaps 2.4.2
JQueryTools 1.1
CGFeedback 1.5.7
TinyMCE 2.9.5
SiteMapMadeSimple 1.2.5
CMSPrinting 1.0.3
MicroTiny 1.2.3
FrontEndUsers 1.18.1
CustomContent 1.8.3
CGUserDirectory 1.3
FormBrowser 0.4.2
CGSmartImage 1.9.4
SelfRegistration 1.6.16
CGJobMgr 1.2.7
CGBlog 1.9.8
JM_Forum 1.0.0
Using Wampserver 2.0 with Apache 2.2.11, PHP 5.3.0, Mysql 5.1.36 on a Win7 computer. I didn't make any changes to this installation since I started working on the project, because it did always work fine.
If there's any other information needed, just let me know and I'll provide it, as I really don't know where to start looking right now...

Thank you very much for any help!!!
Lex
Last edited by leximus on Sun Oct 21, 2012 12:42 pm, edited 1 time in total.
gianpiero
Forum Members
Forum Members
Posts: 221
Joined: Sun Jan 07, 2007 4:32 pm
Location: Italy

Re: Templates breaking up

Post by gianpiero »

this happened to me, related to an old module version, but only when I installed it. Removing it made CMSMS working well

Sorry I 'm not able a this moment to give detailed informations
leximus
Forum Members
Forum Members
Posts: 51
Joined: Fri Oct 20, 2006 8:57 pm

Re: Templates breaking up

Post by leximus »

Thanks for the fast replies! I've now removed both modules, visitorstats and pisearch, because I wasn't using them anymore. Still the problem persists unfortunately...
gianpiero
Forum Members
Forum Members
Posts: 221
Joined: Sun Jan 07, 2007 4:32 pm
Location: Italy

Re: Templates breaking up

Post by gianpiero »

Cache status ? Cleared obviously ... :)
leximus
Forum Members
Forum Members
Posts: 51
Joined: Fri Oct 20, 2006 8:57 pm

Re: Templates breaking up

Post by leximus »

Yes, I already cleared cache many times.. ;)
leximus
Forum Members
Forum Members
Posts: 51
Joined: Fri Oct 20, 2006 8:57 pm

Re: Templates breaking up

Post by leximus »

I am still stuck with this problem... Does nobody have an idea what else I can do to fix it or to find out what's the problem?
Any help is really highly appreciated.
Thanks and best regards,

Lex
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: Templates breaking up

Post by Jo Morg »

I noticed that there was a full line space on the source html you posted... was that by chance or does your browser give that full empty line before the doctype tag?
I would suggest that you turn debug on and take a close look at what the browser shows...
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
leximus
Forum Members
Forum Members
Posts: 51
Joined: Fri Oct 20, 2006 8:57 pm

Re: Templates breaking up

Post by leximus »

The full line space is really there, there are even two lines before the doctype. This is only true for the admin template. What could that mean?
Thanks
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: Templates breaking up

Post by Jo Morg »

I'm not absolutely sure, but I had an issue on a local server (xampp) while using a debugging script. It started rendering code before the doctype (for debug purposes) but that ended up corrupting the html in a way that some browsers (IE for one) didn't like.
In my CMSMS installations the admin log in has no spaces before

Code: Select all

<!doctype html>
<__html>
	<head>
IE usually doesn't like white spaces (nor anything) before a doctype declaration. HTH.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
leximus
Forum Members
Forum Members
Posts: 51
Joined: Fri Oct 20, 2006 8:57 pm

Re: Templates breaking up

Post by leximus »

So finally I found some time to work on...
Don't have a clue where this white space comes from as I haven't edited the admin template at all and there's no white space in the template...

Anyway I've loaded the admin page in debug mode and this is the result. Sorry for the long post :)
Loading the page:
Debug is on. Redirecting disabled... Please click this link to continue.
http://localhost/ga/adminx/login.php
Debug: (1.3000000000041E-5) - (usage: 1078024) - (peak: 1106952)

done loading required files

Debug: (0.010797) - (usage: 1101680) - (peak: 1122232)

Loading c:\wamp\www\ga\lib\classes\class.cms_cookies.php = 22488 bytes for an approximate total of 22488

Debug: (0.010941) - (usage: 1102256) - (peak: 1145448)

loading adodb

Debug: (0.012062) - (usage: 1194224) - (peak: 1233904)

loading page functions

Debug: (0.013541) - (usage: 1349032) - (peak: 1427912)

loading content functions

Debug: (0.013845) - (usage: 1358880) - (peak: 1427912)

loading translation functions

Debug: (0.01413) - (usage: 1370696) - (peak: 1427912)

loading php4 entity decode functions

Debug: (0.015911) - (usage: 1620376) - (peak: 1889376)

done loading files

Debug: (0.015951) - (usage: 1620656) - (peak: 1889376)

Initialize Database

Debug: (0.033081) - (usage: 2303256) - (peak: 2439368)

Done Initializing Database

Debug: (0.033174) - (usage: 2303448) - (peak: 2439368)

Initialize Smarty

Debug: (0.042992) - (usage: 3513736) - (peak: 3516760)

Loading c:\wamp\www\ga\lib\classes\class.Smarty_CMS.php = 1209584 bytes for an approximate total of 1232072

Debug: (0.043709) - (usage: 3582000) - (peak: 3585584)

Loading c:\wamp\www\ga\lib\classes\class.CMSModuleDbTemplateResource.php = 56720 bytes for an approximate total of 1288792

Debug: (0.05404) - (usage: 3596376) - (peak: 3627432)

Loading c:\wamp\www\ga\lib\classes\class.CMSNullTemplateResource.php = 12376 bytes for an approximate total of 1301168

Debug: (0.054163) - (usage: 3596248) - (peak: 3642024)

Done Initialiing Smarty

Debug: (0.054545) - (usage: 3618424) - (peak: 3642256)

Loading c:\wamp\www\ga\lib\classes\class.cms_siteprefs.php = 21384 bytes for an approximate total of 1322552

Debug: (0.055927) - (usage: 3634152) - (peak: 3664504)

(mysql): SELECT sitepref_name,sitepref_value FROM ga_siteprefs

Debug display of 'Loading Modules':(0.058343) - (usage: 3760920) - (peak: 3938128)
Debug: (0.0605) - (usage: 4015184) - (peak: 4144064)

Loading c:\wamp\www\ga\lib\classes\class.moduleoperations.inc.php = 253480 bytes for an approximate total of 1576032

Debug: (0.061071) - (usage: 4019320) - (peak: 4174976)

(mysql): SELECT * FROM ga_modules ORDER BY module_name

Debug: (0.062435) - (usage: 4057528) - (peak: 4178136)

loading module AkismetCheck

Debug: (0.066391) - (usage: 4558576) - (peak: 4642056)

Loading c:\wamp\www\ga\lib\classes\class.CMSModule.php = 454080 bytes for an approximate total of 2030112

Debug: (0.067218) - (usage: 4655016) - (peak: 4798680)

Loading c:\wamp\www\ga\lib\classes\class.CmsLangOperations.php = 52240 bytes for an approximate total of 2082352

Debug: (0.068197) - (usage: 4725888) - (peak: 4798680)

Loading c:\wamp\www\ga\lib\classes\class.CmsNlsOperations.php = 70232 bytes for an approximate total of 2152584

Debug: (0.069049) - (usage: 4762704) - (peak: 4840952)

Loading c:\wamp\www\ga\lib\classes\class.CmsNls.php = 32856 bytes for an approximate total of 2185440

Debug: (0.113776) - (usage: 4982984) - (peak: 5479888)

loading module Backup

Debug: (0.115059) - (usage: 5115072) - (peak: 5479888)

loading module Bookmarks

Debug: (0.11979) - (usage: 5645144) - (peak: 5734584)

loading module Captcha

Debug: (0.12196) - (usage: 5870704) - (peak: 5911856)

loading module CGBlog

Debug: (0.128218) - (usage: 6672936) - (peak: 6703800)

Loading c:\wamp\www\ga\lib\classes\class.contentoperations.inc.php = 200664 bytes for an approximate total of 2386104

Debug: (0.128695) - (usage: 6674624) - (peak: 6740272)

(mysql): SELECT content_id FROM ga_content WHERE default_content = 1 LIMIT 1

Debug: (0.129377) - (usage: 6705032) - (peak: 6741632)

Loading c:\wamp\www\ga\lib\classes\class.CmsRoute.php = 31176 bytes for an approximate total of 2417280

Debug: (0.130159) - (usage: 6766384) - (peak: 6800240)

Loading c:\wamp\www\ga\lib\classes\class.cms_route_manager.php = 60504 bytes for an approximate total of 2477784

Debug: (0.134756) - (usage: 6950504) - (peak: 7020000)

(mysql): SELECT cgblog_id,url FROM ga_module_cgblog WHERE url != ''AND ( IFNULL(start_time, '1970-01-01 00:00:01') < NOW()) AND
(( IFNULL(end_time, '1970-01-01 00:00:01') = '1970-01-01 00:00:01') OR (end_time > NOW()))
ORDER BY cgblog_date DESC

Debug: (0.140408) - (usage: 7078896) - (peak: 7102504)

loading module CGSimpleSmarty

Debug: (0.143245) - (usage: 7262632) - (peak: 7299488)

loading module CGUserDirectory

Debug: (0.146986) - (usage: 7450832) - (peak: 7474608)

loading module FrontEndUsers

Debug: (0.15223) - (usage: 8031016) - (peak: 8057664)

Loading c:\wamp\www\ga\lib\classes\class.cms_module_smarty_plugin_manager.php = 55736 bytes for an approximate total of 2533520

Debug: (0.152725) - (usage: 8034176) - (peak: 8091184)

(mysql): SELECT * FROM ga_module_smarty_plugins ORDER BY module

Debug: (0.156167) - (usage: 8178680) - (peak: 8275056)

Loading c:\wamp\www\ga\lib\classes\class.module_meta.php = 37552 bytes for an approximate total of 2571072

Debug: (0.157289) - (usage: 8226536) - (peak: 8312800)

Loading c:\wamp\www\ga\lib\classes\class.cms_utils.php = 39536 bytes for an approximate total of 2610608

Debug: (0.160931) - (usage: 8320000) - (peak: 8477336)

loading module CMSMailer

Debug: (0.163512) - (usage: 8507000) - (peak: 8585240)

loading module CustomContent

Debug: (0.165767) - (usage: 8654240) - (peak: 8722248)

loading module FCKeditorX

Debug: (0.168957) - (usage: 8869952) - (peak: 8939544)

loading module FileManager

Debug: (0.171535) - (usage: 9050880) - (peak: 9112328)

loading module FormBrowser

Debug: (0.178682) - (usage: 9697912) - (peak: 10049352)

loading module FormBuilder

Debug: (0.193193) - (usage: 11221248) - (peak: 11310784)

loading module Gallery

Debug: (0.21908) - (usage: 11374312) - (peak: 11531488)

loading module JM_Forum

Debug: (0.227558) - (usage: 12203256) - (peak: 12257568)

loading module JQueryTools

Debug: (0.230219) - (usage: 12297960) - (peak: 12335752)

loading module MenuManager

Debug: (0.245117) - (usage: 12477936) - (peak: 12522576)

loading module Printing

Debug: (0.247843) - (usage: 12598072) - (peak: 12644944)

loading module SelfRegistration

Debug: (0.25328) - (usage: 13032208) - (peak: 13148592)

loading module SiteMapMadeSimple

Debug: (0.255583) - (usage: 13136832) - (peak: 13185112)

loading module Statistics

Debug: (0.263784) - (usage: 14029760) - (peak: 14493448)

loading module TinyMCE

Debug display of 'End of Loading Modules':(0.265744) - (usage: 14325888) - (peak: 14493448)
Debug: (0.266331) - (usage: 14357272) - (peak: 14493448)

Loading c:\wamp\www\ga\lib\classes\class.CmsRegularTaskHandler.php = 30720 bytes for an approximate total of 2641328

Debug: (0.266433) - (usage: 14304296) - (peak: 14493448)

No session found. Now check for cookies

Debug: (0.266468) - (usage: 14304504) - (peak: 14493448)

No cookies found. Redirect to login.
And when the log in page is loaded:
Smarty Debug Console - Total Time 0.70538
included templates & config files (load time in seconds)
C:\wamp\www\ga\adminx\themes\OneEleven\templates\login.tpl (compile 0.16757) (render 0.01935) (cache 0.00000)
assigned template variables
$SCRIPT_NAME Smarty_Variable Object (3)
->value = "/ga/adminx/login.php"
->nocache = false
->scope = "Global"
$app_name Smarty_Variable Object (3)
->value = "CMS"
->nocache = false
->scope = "Smarty root"
$ccuser Smarty_Variable Object (3)
->value = ccUser Object (0)
->nocache = false
->scope = "Smarty root"
$cgsimple Smarty_Variable Object (3)
->value = cgsimple Object (0)
->nocache = false
->scope = "Smarty root"
$config Smarty_Variable Object (3)
->value = cms_config Object (0)
->nocache = false
->scope = "Smarty root"
$encoding Smarty_Variable Object (3)
->value = "UTF-8"
->nocache = false
->scope = "Smarty root"
$jm_f Smarty_Variable Object (3)
->value = JM_Forum Object (13)
->TreeManager = JM_Forum_Tree Object (9)
->module = ""
->lang = null
->numNodeInvolved = null
->arrNodeInvolved = null
->_customField = Array (0)
->_allNodeField = Array (12)
0 => "id"
1 => "parent"
2 => "lft"
3 => "rgt"
4 => "level"
5 => "norder"
6 => "tree"
7 => "skip"
8 => "children"
9 => "node_id"
10 => "content_alias"
11 => "lang"
->_inTransaction = null
->_periodTransaction = 120
->Tables = Array (3)
JM_TREE_TRANSACTION => "ga_module_jm_forum_tree_transaction"
JM_TREE_NODE => ""
JM_TREE_CONTENT => ""
->ModuleData = null
->MyUserData = null
->PropertiesForum = Array (0)
->customField = Array (6)
0 => "type"
1 => "name"
2 => "description"
3 => "forum_icon"
4 => "topics_count"
5 => "posts_count"
->lang = ""
->Tables = Array (6)
TABLE_FORUM_POSTS => "ga_module_jm_forum_posts"
TABLE_FORUM_TOPICS => "ga_module_jm_forum_topics"
TABLE_FORUM_FORUM_PROPERTY => "ga_module_jm_forum_forum_property"
TABLE_FORUM_PROPERTIES => "ga_module_jm_forum_properties"
TABLE_FORUM_USERS => "ga_module_jm_forum_users"
TABLE_FORUM_BANNED => "ga_module_jm_forum_banned"
->curlang = null
->langhash = Array (0)
->params = Array (1)
0 => Array (4)
name => "lang"
default => "en_US"
optional => true
help => "Parameter is used to specify what lan..."
->wysiwygactive = false
->syntaxactive = false
->error = ""
->nocache = false
->scope = "Smarty root"
$lang Smarty_Variable Object (3)
->value = ""
->nocache = false
->scope = "Smarty root"
$sitename Smarty_Variable Object (3)
->value = "Groupe Animateur Asbl"
->nocache = false
->scope = "Smarty root"
$smarty Smarty_Variable Object (3)
->value = null
->nocache = false
->scope = "Smarty root"
$usernamefld Smarty_Variable Object (3)
->value = "username"
->nocache = null
->scope = "Smarty root"
assigned config file variables (outer template scope)
Does this information help anybody?
Thanks again.

Lex
leximus
Forum Members
Forum Members
Posts: 51
Joined: Fri Oct 20, 2006 8:57 pm

Re: Templates breaking up

Post by leximus »

I can't believe it right now, but I finally found the bug... ;)

After playing around with different versions of my site, I finally realized that the error had something to do with CGBlog. And it was my fault of course :)
I edited the language file in order to translate some strings in Luxembourgish. And as our language uses a lot of accents, I had the traditional encoding problems. I encoded the whole document in utf-8. So after comparing with the original language file, I found out that the original was encoded in ANSI. Encoding my file in ANSI made the whole thing work again... :) Unbelievable how much trouble one can get with encoding wrong...

I'm really glad it's working again and would like to thank everyone that helped me, because I was really turning in circles for a long time! ;)

Best regards,

Lex
Last edited by leximus on Fri Apr 12, 2013 4:08 pm, edited 1 time in total.
KO
Power Poster
Power Poster
Posts: 562
Joined: Mon Nov 06, 2006 7:55 pm
Location: Helsinki, Finland

Re: [SOLVED] Templates breaking up

Post by KO »

Thanks for sending your solution here.

I had similar problem while updating old site and this helped. If anyone else has similar problem you might get past it by setting site default language to english if it's not set. This might get the site running while you search for the solution.
leximus
Forum Members
Forum Members
Posts: 51
Joined: Fri Oct 20, 2006 8:57 pm

Re: [SOLVED] Templates breaking up

Post by leximus »

Hi,

I'm glad it helped you ;)
Post Reply

Return to “CMSMS Core”