[Solved] {content} swallows parts of my pages when inserted into template aft...

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
pdedecker
Forum Members
Forum Members
Posts: 28
Joined: Sun Apr 16, 2006 8:25 am

[Solved] {content} swallows parts of my pages when inserted into template aft...

Post by pdedecker »

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.
Last edited by pdedecker on Mon Mar 15, 2010 8:01 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: {content} swallows parts of my pages when inserted into template after upgrade

Post by Dr.CSS »

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...
pdedecker
Forum Members
Forum Members
Posts: 28
Joined: Sun Apr 16, 2006 8:25 am

Re: {content} swallows parts of my pages when inserted into template after upgrade

Post by pdedecker »

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.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: {content} swallows parts of my pages when inserted into template after upgrade

Post by Rolf »

pdedecker wrote: The same thing happens with the tag {hierarchy}.
Never heard of the {hierarchy} tag...  :-\
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
- + - + - + - + - + - + -
Image
pdedecker
Forum Members
Forum Members
Posts: 28
Joined: Sun Apr 16, 2006 8:25 am

Re: {content} swallows parts of my pages when inserted into template after upgrade

Post by pdedecker »

Rolf wrote: Never heard of the {hierarchy} tag...  :-\
What is it for? Perhaps an old functionality which isn't working with recent releases???
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:

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);
Here's the template. It's a modified version of a theme I found on the internet. I edited some HTML code for privacy reasons, but I haven't removed any of the Smarty tags so that the nature problem doesn't change.

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>
What 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:
Checking PHP memory limit
(minimum 16M, recommend 24M or greater)

You have 8M
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:
fopen: When allow url fopen is disabled you will not be able to accessing URL object like file using the ftp or http protocol.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: {content} swallows parts of my pages when inserted into template after upgrade

Post by Rolf »

What 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
You will find System Information in
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
- + - + - + - + - + - + -
Image
pdedecker
Forum Members
Forum Members
Posts: 28
Joined: Sun Apr 16, 2006 8:25 am

Re: {content} swallows parts of my pages when inserted into template after upgrade

Post by pdedecker »

----------------------------------------------

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

----------------------------------------------
pdedecker
Forum Members
Forum Members
Posts: 28
Joined: Sun Apr 16, 2006 8:25 am

Re: {content} swallows parts of my pages when inserted into template after upgrade

Post by pdedecker »

In other bad news: I'm also unable to edit pages.

Image

The WYSIWYG editor is gone...
Last edited by pdedecker on Mon Mar 15, 2010 7:39 pm, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: {content} swallows parts of my pages when inserted into template after upgrade

Post by Rolf »

The WYSIWYG editor is suddenly gone...
You haven't got the {content} tag in the template I think...   ;D That's why it isn't shown at the moment  ;)

R
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
pdedecker
Forum Members
Forum Members
Posts: 28
Joined: Sun Apr 16, 2006 8:25 am

Re: {content} swallows parts of my pages when inserted into template after upgrade

Post by pdedecker »

Rolf wrote: You haven't got the {content} tag in the template I think...   ;D That's why it isn't shown at the moment  ;)
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.

Thanks guys!
pdedecker
Forum Members
Forum Members
Posts: 28
Joined: Sun Apr 16, 2006 8:25 am

Re: {content} swallows parts of my pages when inserted into template after upgrade

Post by pdedecker »

Oh, one more thing... do you know why I don't have the shiny new admin theme I saw in the OpenSourceCMS.com demo?
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: {content} swallows parts of my pages when inserted into template after upgrade

Post by Rolf »

pdedecker 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?
My Preferences >> User Preferences >> Administration Theme >> NCleanGrey

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
- + - + - + - + - + - + -
Image
Locked

Return to “[locked] Installation, Setup and Upgrade”