[Solved] {content} swallows parts of my pages when inserted into template aft...
[Solved] {content} swallows parts of my pages when inserted into template aft...
I just upgraded from an older version (1.2.3, I believe) to the latest version. Among other things, the admin section doesn't have the new look but does have the new features such as the message center. It says on the bottom that I'm running version 1.6.7. But that's not the main reason why I'm here.
I discovered that as soon as I insert {content} into the active template, parts of my pages are being swallowed by the CMS. This is not a design issue, I actually looked at the code and saw that the entire section had gone missing. When I remove {content}, all turns back to normal. The same thing happens with the tag {hierarchy}.
What could be the cause of this? I already tried verifying the checksum of the install, and it detected no errors.
I discovered that as soon as I insert {content} into the active template, parts of my pages are being swallowed by the CMS. This is not a design issue, I actually looked at the code and saw that the entire section had gone missing. When I remove {content}, all turns back to normal. The same thing happens with the tag {hierarchy}.
What could be the cause of this? I already tried verifying the checksum of the install, and it detected no errors.
Last edited by pdedecker on Mon Mar 15, 2010 8:01 pm, edited 1 time in total.
Re: {content} swallows parts of my pages when inserted into template after upgrade
That sounds very strange, especially considering you should have already had {content} in the template, you may need to be more descriptive in the steps you took to get where you are...
I've upgraded much older sites and never had this problem...
more info = more help...
I've upgraded much older sites and never had this problem...
more info = more help...
Re: {content} swallows parts of my pages when inserted into template after upgrade
So here's the deal: I had a custom template that worked fine in 1.2.3. Then I upgraded to 1.6.7 and saw that the site's pages were no longer getting generated correctly. In fact, all that was left were the site logo and a search box.
I emptied the template and pasted the code bit by bit to see which piece of code was making CMSMS go berserk. It turned out the culprits were {content} and {hierarchy}, which is why I'm now left wondering why the CMS is having trouble with this.
I emptied the template and pasted the code bit by bit to see which piece of code was making CMSMS go berserk. It turned out the culprits were {content} and {hierarchy}, which is why I'm now left wondering why the CMS is having trouble with this.
Re: {content} swallows parts of my pages when inserted into template after upgrade
Never heard of the {hierarchy} tag...pdedecker wrote: The same thing happens with the tag {hierarchy}.

What is it for? Perhaps an old functionality which isn't working with recent releases???
What is your html-template?
Your System Information?
®olf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: {content} swallows parts of my pages when inserted into template after upgrade
I don't exactly remember what it does as I made the template a long time ago. It doesn't look like something I have written. Here's the code:Rolf wrote: Never heard of the {hierarchy} tag...
What is it for? Perhaps an old functionality which isn't working with recent releases???
Code: Select all
global $gCms;
$pos = $gCms->variables[''position''];
$base = explode(''.'', $pos);
$smarty->assign(''h_toplevel'', $base[0] * 1);
$smarty->assign(''h_parent'', $base[ (count($base) > 1) ? count($base)-2 : 0 ] * 1);
$smarty->assign(''h_this'', $base[count($base)-1] * 1);
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
{metadata}
<link rel="stylesheet" href="/stylesheets/site.css" type="text/css" />
<title>{sitename} | {title}</title>
<!-- Google Analytics -->
</head>
</__body>
<!-- wrap starts here -->
<div id="wrap">
<div id="header">
<div id="logo"><img src="/images/site/logo.gif" class="no-border" alt="Logo"></div>
<!-- Search box -->
<form id="m2moduleform_1" name="m2moduleform_1" class="searchform" method="get" action="index.php"><div class="hidden"><input type="hidden" name="mact" value="Search,m2,dosearch,0" /></div>
<p><input style="color: #555555; border: 1px solid #888888" type="text" name="m2searchinput" id="m2searchinput"/>
<input name="submit" id="m2searchinput" value="Search" type="submit" style="border: 1px solid #CCCCCC"/></p>
</form>
{menu template=''site_tabs.tpl''}
</div>
<!-- content-wrap starts here -->
<div id="content-wrap">
<img src="/images/site/headerphoto.jpg" width="820" height="25" class="no-border" />
<div name="menu_desc" id="menu_desc" style="margin-top: -27px; margin-right: 5px; color: white; text-align: right; font-weight: bold">Welcome to our site!</div>
<img src="/images/site/header_people.jpg" width="100%" height="144" class="no-border"/>
<div id="sidebar">
{hierarchy}
{menu template=''site_submenu.tpl'' start_element=$h_toplevel collapse=''1''}
</div>
<div id="main">
{content}
<br />
</div>
<!-- content-wrap ends here -->
</div>
<!-- footer starts here -->
<div id="footer">
<div class="footer-left">
<p class="align-left">
Last modification: {modified_date format="%d/%m/%y"}
</p>
</div>
<div class="footer-right">
<p class="align-right">
{switcher}<!-- This tag was defined by me and works fine -->
</p>
</div>
</div>
<!-- footer ends here -->
</div>
<!-- wrap ends here -->
<!-- Extra scripts -->
<__script__ language="JavaScript">
{literal}
defaultMenuText = document.getElementById(''menu_desc'').innerHTML;
if (document.getElementById(''main'').offsetHeight < document.getElementById(''sidebar'').offsetHeight) {
document.getElementById(''main'').style.height = document.getElementById(''sidebar'').offsetHeight + "px";
}
function revertMenuText() {
document.getElementById(''menu_desc'').innerHTML = defaultMenuText;
}
function setMenuText(text) {
document.getElementById(''menu_desc'').innerHTML = text;
}
{/literal}
</__script>
<__body>
</__html>
I don't know if this is relevant, but when I was upgrading I got this warning:
I have never ran into problems with this before the upgrade, so I assumed it was okay. There's no way the web host is changing this setting. Here's another warning I got:Checking PHP memory limit
(minimum 16M, recommend 24M or greater)
You have 8M
fopen: When allow url fopen is disabled you will not be able to accessing URL object like file using the ftp or http protocol.
Re: {content} swallows parts of my pages when inserted into template after upgrade
You will find System Information inWhat do you mean when you say system information? Do you want a screenshot of phpinfo()?
I don't know if this is relevant, but when I was upgrading I got this warning:
Quote
Checking PHP memory limit
(minimum 16M, recommend 24M or greater)
You have 8M
Site Admin >> System Information >> View Text Report (suitable for copying into forum posts)
But first change in the config.php:
$config['php_memory_limit'] = '60M';
Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: {content} swallows parts of my pages when inserted into template after upgrade
----------------------------------------------
Cms Version: 1.6.7
Installed Modules:
CMSMailer: 1.73.14
FCKeditorX: 1.0.5
MenuManager: 1.6.2
ModuleManager: 1.3.2
News: 2.10.4
nuSOAP: 1.0.1
Search: 1.6.1
ThemeManager: 1.1.1
FileManager: 1.0.2
Printing: 1.0.4
Config Information:
php_memory_limit: 60M
process_whole_template: false
max_upload_size: 2000000
default_upload_permission: 664
assume_mod_rewrite: false
page_extension:
internal_pretty_urls: false
use_hierarchy: false
Php Information:
phpversion: 5.2.9
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
memory_limit: 60M
max_execution_time: 60
safe_mode: Off (False)
session_save_path: /tmp (1777)
session_use_cookies: On (True)
Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 4.1.22
----------------------------------------------
Re: {content} swallows parts of my pages when inserted into template after upgrade
Last edited by pdedecker on Mon Mar 15, 2010 7:39 pm, edited 1 time in total.
Re: {content} swallows parts of my pages when inserted into template after upgrade
You haven't got the {content} tag in the template I think... ;D That's why it isn't shown at the momentThe WYSIWYG editor is suddenly gone...

R
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: {content} swallows parts of my pages when inserted into template after upgrade
I removed the {content} tag from the template because I wanted to be able to put a "We're experiencing technical difficulties" placeholder on the site. I put the tag back in place, I got the editor back and because of the memory tweak in config.php I now have the site back too.Rolf wrote: You haven't got the {content} tag in the template I think...That's why it isn't shown at the moment ;)
Thanks guys!
Re: {content} swallows parts of my pages when inserted into template after upgrade
Oh, one more thing... do you know why I don't have the shiny new admin theme I saw in the OpenSourceCMS.com demo?
Re: {content} swallows parts of my pages when inserted into template after upgrade
My Preferences >> User Preferences >> Administration Theme >> NCleanGreypdedecker wrote: Oh, one more thing... do you know why I don't have the shiny new admin theme I saw in the OpenSourceCMS.com demo?
Please put [solved] In the title of the first post
Have fun

Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -