MyBB Community Forums

Full Version: Weird Text before Doctype Declaration and Compression Errors after upgrade to 1.6.10
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have a forum at http://www.iiuse.com which I am hosting at openshift.com. I upgraded it today from MyBB 1.6.9 to 1.6.10. After that, I started getting two different errors.
  1. Frond end of the site is not loading. Instead the browsers are complaining that the server is using wrong type of compression. I can access the admin CP. If I turn off Gzip Compression in the Admin CP, then the frond end starts loading. But reactivating the compression brings the problem back.
  2. EVERY page of the admin CP and also the front end (if I make it to load by deactivating gzip compression) has this text at the very beginning, even before the DOCTYPE declaration:
     = "UTF-8"; ?>
    You can check it out yourself by accessing either the public area at http://www.iiuse.com or the the Admin CP's login page at http://www.iiuse.com/admin/

Any suggestions to overcome both of these problem will be highly appreciated Smile

Thanks in advance!

Additional Information: I upgraded a local copy of this same forum installed on my desktop system using the exact same changed files set and it is working perfecly. None of the above mentioned errors is occuring. When I ran the upgrade script by accessing /install/ in the browser for the iiuse.com version of this forum, I was once prompted to log in stating that you don't have permissions to run this script probably before the templates upgrade step. I clicked on the link in this error message that was supposed to take me to some kind of login screen but it simply reset back to the first step of the upgrade where we have to choose the current version of MyBB. I repeated all steps from this point and this time it didn't gave me any errors and upgrade completed successfully.

I have full backup of the pre-upgrade state which I can restore easily and perform the upgrade again but I am asking this question hoping that fixing these little errors will be less time consuming and I might even learn something new in the process Smile
Go to ACP>Templates & Style>Templates>Your Template>Ungrouped Templates>headerinclude and check if you have = "UTF-8"; ?> somewhere and remove it
^ actual related code in headerinclude template is --> <meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
(2013-09-01, 04:30 PM)marcus123 Wrote: [ -> ]Go to ACP>Templates & Style>Templates>Your Template>Ungrouped Templates>headerinclude and check if you have = "UTF-8"; ?> somewhere and remove it
no, it doesn't include this text. the first line of the 'headerinclude' template is:
<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
Please post the entire headerinclide code
(2013-09-01, 04:34 PM).m. Wrote: [ -> ]^ actual related code in headerinclude template is --> <meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
yeah, and even the doctype itself is coming from the 'htmldoctype' template. The problematic code is appearing even before it Sad

(2013-09-01, 04:37 PM)marcus123 Wrote: [ -> ]Please post the entire headerinclide code

sure. here is the 'headerinclude' code:
<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/prototype.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/general.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/popup_menu.js?ver=1600"></script>
{$stylesheets}
<script type="text/javascript">
<!--
	var cookieDomain = "{$mybb->settings['cookiedomain']}";
	var cookiePath = "{$mybb->settings['cookiepath']}";
	var cookiePrefix = "{$mybb->settings['cookieprefix']}";
	var deleteevent_confirm = "{$lang->deleteevent_confirm}";
	var removeattach_confirm = "{$lang->removeattach_confirm}";
	var loading_text = '{$lang->ajax_loading}';
	var saving_changes = '{$lang->saving_changes}';
	var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
	var my_post_key = "{$mybb->post_code}";
	var imagepath = "{$theme['imgdir']}";
// -->
</script>
{$newpmmsg}

and going one step further, here is the 'htmldoctype' code.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

I have tried changing it to make sure that the doctype is actually coming from this template and it is. Also, please note that same extraneous text is also appearing on the pages of the ACP.
Firebug shows that your <head></head> is empty but checking source code it looks OK Undecided I think you have to check core php files
If you disable/turn off all plugins, does it still show up?
Before you upgrade to a newer version you have to disable all the plugins! Did you disable all the plugins before the update?
(2013-09-01, 05:04 PM)Darrell Wrote: [ -> ]If you disable/turn off all plugins, does it still show up?

(2013-09-01, 05:15 PM)marcus123 Wrote: [ -> ]Before you upgrade to a newer version you have to disable all the plugins! Did you disable all the plugins before the update?

Well, this was really my mistake that I didn't disable the couple of plugins that I have installed on this forum prior to upgrade.

Anyways, the real problem, that I spotted with the help of .m. in the PM Smile was that the bottom of my ./inc/languages/english.php file was

// Sets the character set, blank uses the default.
$langinfo['charset'] = "UTF-8";
?> = "UTF-8";
?>

instead of:

// Sets the character set, blank uses the default.
$langinfo['charset'] = "UTF-8";
?>

Now, honestly guys, I have no idea from where this text got added to this file. I never touched it Sad
Pages: 1 2