Page 1 of 2

Pages start with </__body> tag, not parsing header

Posted: Mon Feb 04, 2013 6:59 pm
by pixelita
I replied to a [SOLVED] thread and realized I won't get any help that way.

I have several CMSMS sites that were all working just fine a few weeks or days ago when I last checked. Now, they are broken. CMSMS is ignoring all the <header> content and starts processing with the </__body> tag, but it also selectively ignores menu manager items and the footer contents.

What's worse, on the backend, although the products module is installed, no products appear, but they are in the database. Also, on the backend, you cannot go to the Module Extender and see a list of modules to be upgraded nor a list of modules available for download.

AND under System tasks, you cannotl view system info or copy and paste any of the relevant into a forum post.

I am at a lost as to what the issue is. I created phpinfo.php files for each of the servers involved if anyone wants to check those.
http://pixelita.com/phpinfo.php
http://mytestbed.com/phpinfo.php

The sites at issue are:
http://honfish.mytestbed.com (login is client/letmein)
Isabella (1.11.2)

http://northshorehsband.com/
Galapagos (1.11.0)
(mytestbed.com)

http://cmsms.pixelita.com
(Isabella (1.11.2)
I created this last night as a fresh install to see if I could replicate the problem and sure enough, it persists even with a new install.

Sites NOT affected by this are:
http://www.welovecmsms.com
(Faangui)
(pixelita.com)

http://www.idylwood.org
(Isabella 1.11.2)
(pixelita.com)

They all have a variety of modules installed, honfish.mytestbed.com has the most with the ecommerce and some other things.

Thanks for any assistance. I am not beyond paying for someone to help me with this. I will want to move the honfish site to the client's servers once this is ironed out (he is hosted with Arvixe), so hopefully the problem won't travel with such a move.

Re: Pages start with </__body> tag, not parsing header

Posted: Mon Feb 04, 2013 7:06 pm
by calguy1000
CMSMS processes templates in 3 chunks in this order:

a: stuff above the <head> statement is passed through smarty
b: the stuff starting from </__body> down is passed through smarty
c: the stuff from <head> to </__body> is passed through smarty.

Then the output is concatenated together and sent to the browser.

If the output is stopping at the </__body> tag that probably means that there is an error in processing your <head> section.

Check the head section of your templates.... and any smarty that is in the page metadata field of the page.

Check for errors in your logs.

Re: Pages start with </__body> tag, not parsing header

Posted: Mon Feb 04, 2013 7:12 pm
by pixelita
Thanks, CalGuy. It's frustrating because I did nothing to change them. They just woke up one morning and decided they didn't feel like working anymore. (I know that feeling!)

Here is what is in the header template. As I said, all of this worked beautifully a few weeks ago. I am inclined to take the client's Insight (live chat) code out and perhaps all the JS and then start over adding things one by one until it breaks again -- assuming I can get it to work by stripping out some cruft.

Code: Select all

<title>{sitename} :: {title}</title>
{metadata}
{cms_stylesheet}
{capture}{content block="META Description" oneline="true"}{/capture}
{literal}
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="http://honfish.mytestbed.com/uploads/ie.css" />
<![endif]-->
{/literal}
{literal}
<!--[if !IE 7]>

<style type="text/css">
	#wrap {display:table;height:100%}
</style>
<![endif]-->
{/literal}

<__script__ type="text/javascript">
    google.load("jquery", "1.4.2");
</__script>
<__script__ src="http://honfish.mytestbed.com/lib/jquery/js/starrating.js" type="text/javascript" charset="utf-8"></__script>

<__script__ src="http://honfish.mytestbed.com/js/starrating.js" type="text/javascript" charset="utf-8"></__script>

<__script__ type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAoViXFMGjXHA7wEYteWJISxQT_Cp7tgGQmiAuomWJ-e0l5hLcYxTDNXPxL9cSIFXMuXaSOau_ZwXyHA"></__script>

{literal}
<__script__ type="text/javascript">    
    $(document).ready(function() {
        star_rating();
    });
</__script>
{/literal}

<__script__ src="/uploads/flowplayer/example/flowplayer-3.2.6.min.js" type="text/javascript"></__script>

<__script__  type="text/javascript">
	flowplayer("player", "/uploads/flowplayer/flowplayer-3.2.6.swf");
</__script>

<link rel="shortcut icon" href="favicon.ico" />

<!-- Monitor tag for Account honolulufish (ID: 151), Site
honolulufish.com (ID: 168), Queue Sales (ID: 367) -->  
{literal}
<__script__ language=javascript src="https://sightmax75R2.sightmaxondemand.com/honolulufish/SightMaxAgentInterface/Monitor.smjs?accountID=151&siteID=168&queueID=367"></__script>
{/literal}

<!-- LOAD GOOGLE FONTS -->
<link href="http://fonts.googleapis.com/css?family=Trocchi&subset=latin,latin-ext" rel="stylesheet" type="text/css" />
<link href="http://fonts.googleapis.com/css?family=Montaga" rel="stylesheet" type="text/css" />

Re: Pages start with </__body> tag, not parsing header

Posted: Mon Feb 04, 2013 7:22 pm
by pixelita
I stripped the header code down to this:

Code: Select all

<title>{sitename} :: {title}</title>
{metadata}
{cms_stylesheet}
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="http://honfish.mytestbed.com/uploads/ie.css" />
<![endif]-->
{/literal}
{literal}
<!--[if !IE 7]>
<style type="text/css">
	#wrap {display:table;height:100%}
</style>
<![endif]-->
{/literal}

<__script__ src="/uploads/flowplayer/example/flowplayer-3.2.6.min.js" type="text/javascript"></__script>

<__script__  type="text/javascript">
	flowplayer("player", "/uploads/flowplayer/flowplayer-3.2.6.swf");
</__script>
And it's still broken. But what's weirder is if you try to edit a page, there's a 404 not found and it tries to throw some of the top navigation stuff in where the page editing stuff should be.

And although you can SEE all the menu manager items listed, if you try to edit them, it's just a blank screen.

And everything IS in the database so it's not lost. It CAN be painstakingly recreated.

I am inclined to now look at some modules not playing nice with one another?

Re: Pages start with </__body> tag, not parsing header

Posted: Mon Feb 04, 2013 7:31 pm
by pixelita
Well, actually, CalGuy, the processing of content is not STOPPING at the </__body> tag, it's STARTING at the </__body> tag, it's skipping everything in the <head> completely.

I have seen threads about this but they aren't helpful; one was marked solved with no indication of how it was solved and when I posted there someone replied that they thought that it just solved itself. (Which to me means some web host is mucking around with server settings when you have transient behavior like that.)

So I am all out of ideas and I need to get this site up and the client has invested in CMSMS and in us to develop his ecommerce site with it. But I may be forced to look at other options if no solution is on the horizon. That's what the client gets for dragging his feet. I've been after him to launch the site since before Christmas. Ugh.

Re: Pages start with </__body> tag, not parsing header

Posted: Mon Feb 04, 2013 7:45 pm
by Dr.CSS
Did your host upgrade the PHP and not tell you, maybe you have a GCB that uses something from a UDT that is not configured correctly anymore as PHP 5.3 or so has had problems with some UDTs...

Re: Pages start with </__body> tag, not parsing header

Posted: Mon Feb 04, 2013 7:48 pm
by pixelita
That makes sense since the problems exist across several installs and several servers (both managed by the same web host, one using PHP 5.2.9 and the other using PHP 5.3.x.

Thanks!

Re: Pages start with </__body> tag, not parsing header

Posted: Mon Feb 04, 2013 8:14 pm
by calguy1000
Actually:

a: Your new install works correctly.
b: Your installs that do not work don't even finish processing the </__body> tag before they puke (<__body></__html> is not output). It stops on one site directly after processing the news summary.

so:
a: Check your templates for calls to third party modules, plugins or UDT's.
(also check GCB's that are called from those templates).
b: Check that content page for calls to third party module, plugins or UDT's.
(also check GCB's that are called from that page).

PHP is dying... and there is an error message some place. But if you cannot find it, you will need to use a process of elimination to isolate the error.

Re: Pages start with </__body> tag, not parsing header

Posted: Mon Feb 04, 2013 8:21 pm
by pixelita
Thanks. And all that affects the backend too, weirdly, right?

Re: Pages start with </__body> tag, not parsing header

Posted: Mon Feb 04, 2013 11:00 pm
by psy
I don't know if this is the cause of the error, but the following tag is written incorrectly:

Code: Select all

{capture}{content block="META Description" oneline="true"}{/capture}
The 'block' param should not have spaces. The text "META Description" should be the label param, eg:

Code: Select all

{capture}{content block="metadescription" label="META Description" oneline="true"}{/capture}

Re: Pages start with </__body> tag, not parsing header

Posted: Mon Feb 04, 2013 11:57 pm
by calguy1000
You may be able to get away with spaces in the block param.

However. {capture} is supposed to take arguments. like

Code: Select all

{capture assign='foo'}{content block='meta_description'}{/capture}
also: {capture} is slow, and shouldn't be used unless necessary.

Code: Select all

{content block='foo' assign='foo'}
is much faster.

Re: Pages start with </__body> tag, not parsing header

Posted: Tue Feb 05, 2013 12:02 am
by pixelita
Thank you both. I cannot wait to get home in front of my computer and try this out.

Can we get a CMSMS Camp going? :D Some of us (well, ME) could use something like that!

Re: Pages start with </__body> tag, not parsing header

Posted: Tue Feb 05, 2013 8:35 pm
by psy
Calguy, thanks for the tips about {capture} and {content block="xxx" assign="myvar"}.

Using spaces in the content block name has caused a few problems for me in the past. Keeping the "block" param url-friendly and using "label" for the display name has always worked correctly.

psy

Re: Pages start with </__body> tag, not parsing header

Posted: Thu Feb 07, 2013 1:57 pm
by pixelita
I have made some headway I believe in trying to troubleshoot this problem but I am afraid I may be in over my head and will want some paid assistance. I will post a link to this thread in the "looking to hire" section in just a minute.

I cleaned up the header code as best I could. All the templates use that exact same header code, and the only template that behaves is the front page template. I even tried pulling in another theme ("Mobility" from the theme repository) to see if it was MY coding that is at fault (it's on the About page), but the mobility template is doing the same thing. Starting out with the </__body> tag and no page is getting further than the end of the sidebar. I have no idea what is wrong; I've done all the system maintenance, I am at a loss. I am going to post my system information -- that's some improvement; before, I couldn't even get to that section of the back end -- and also post the code that is in my header. Hopefully someone will be able to help me (for pay of course) figure out what happened, but more importantly figure out WHY it happened so it does not happen again.

Here is the site; it's a testbed, but I've removed authentication so you wouldn't have to key in credentials just to take a look:

http://honfish.pixelita.com

First the contents of each of my headers:

Code: Select all

<!-- GBC HEADER HFCV3 -->
<title>{sitename} :: {title}</title>
{metadata}
{cms_stylesheet}
<!-- Let's hide all the scripts from Smarty by wrapping them in a literal tag -->
{literal}
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="http://honfish.mytestbed.com/uploads/ie.css" />
<![endif]-->
{/literal}
{literal}
<!--[if !IE 7]>
<style type="text/css">
   #wrap {display:table;height:100%}
</style>
<![endif]-->
{/literal}

{literal}
<__script__ type="text/javascript">
    google.load("jquery", "1.4.2");
</__script>
{/literal}

{literal}
<__script__ src="http://honfish.mytestbed.com/lib/jquery/js/starrating.js" type="text/javascript" charset="utf-8"></__script>
{/literal}

{literal}
<__script__ src="http://honfish.mytestbed.com/js/starrating.js" type="text/javascript" charset="utf-8"></__script>
{/literal}

{literal}
<__script__ type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAoViXFMGjXHA7wEYteWJISxQT_Cp7tgGQmiAuomWJ-e0l5hLcYxTDNXPxL9cSIFXMuXaSOau_ZwXyHA"></__script>
{/literal}

{literal}
<__script__ type="text/javascript">    
    $(document).ready(function() {
        star_rating();
    });
</__script>
{/literal}

{literal}
<__script__ src="/uploads/flowplayer/example/flowplayer-3.2.6.min.js" type="text/javascript"></__script>
{/literal}

{literal}
<__script__  type="text/javascript">
   flowplayer("player", "/uploads/flowplayer/flowplayer-3.2.6.swf");
</__script>
{/literal}

{literal}
<__script__ type="text/JavaScript">
<!--
//pass min and max - measured against window width
function P7_MinMaxW(a,b){
var nw="auto",w=document.documentElement.clientWidth;
if(w>=b){nw=b+"px";}if(w<=a){nw=a+"px";}return nw;
}
//-->
</__script>
{/literal}

{literal}
    <!--[if lte IE 6]>
    <style type="text/css">
    #pagewrapper {width:expression(P7_MinMaxW(720,1200));}
    #container {height: 1%;}
    </style>
    <![endif]-->
{/literal}

<!-- Monitor tag for Account honolulufish (ID: 151), Site
honolulufish.com (ID: 168), Queue Sales (ID: 367) -->  
{literal}
<__script__ language=javascript src="https://sightmax75R2.sightmaxondemand.com/honolulufish/SightMaxAgentInterface/Monitor.smjs?accountID=151&siteID=168&queueID=367"></__script>
{/literal}

<link rel="shortcut icon" href="favicon.ico" />

<!-- LOAD GOOGLE FONTS -->
<link href="http://fonts.googleapis.com/css?family=Trocchi&subset=latin,latin-ext" rel="stylesheet" type="text/css" />
<link href="http://fonts.googleapis.com/css?family=Montaga" rel="stylesheet" type="text/css" />
My system info:
Cms Version: 1.11.2

Installed Modules:

CMSMailer: 5.2.1
CGBlog: 1.9.8
ModuleManager: 1.5.5
News: 2.12.7
nuSOAP: 1.0.2
Search: 1.7.7
ThemeManager: 1.1.7
TinyMCE: 2.9.11
Gallery: 1.4.1
Captcha: 0.4.5
TagRep: 1.2.0
CGExtensions: 1.31.4
CMSForms: 1.0.1
FormBuilder: 0.7.3
ShopMadeSimple: 0.3.2
Uploads: 1.14.3
Play: 1.0.3
FrontEndUsers: 1.21
CGEcommerceBase: 1.3.11
CGSimpleSmarty: 1.5.2
CGPaymentGatewayBase: 1.1
JavaScript: 1.0.2
PaypalGateway: 2.3.9
Orders: 1.13.3
MenuManager: 1.8.4
RateThis: 1.0
CTLModuleMaker: 2.0.3
CGMyOrders: 1.0
ShareItPop: 0.1.1
AdvancedContent: 0.9.4.3
MicroTiny: 1.2.3
GBFilePicker: 1.3.2
ModuleMaker: 0.3.2
Twitter: 1.10
SFacebook: 0.1
youtubeplayer: 1.3.1
CMSUsers: 1.0.10
FileManager: 1.4.1
JQueryTools: 1.2.4
Products: 2.18.4
Cart: 1.8.4


Config Information:

php_memory_limit:
process_whole_template:
output_compression:
max_upload_size: 50000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 5.3.17
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 64M
max_execution_time: 30
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 50M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 5.1.66
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable

Re: Pages start with </__body> tag, not parsing header

Posted: Thu Feb 07, 2013 5:08 pm
by Dr.CSS
I don't know if you are using them but you have modules for 2 different e-com set ups and from what I've heard they don't play nice on the same site, I would make sure all the modules are updated to work with the latest version of CMSMS...