View Full Version : Duplicate doctype and metas in CMPS integrated pages
Hi!
While checking around to see why I also had this problem (http://www.vbadvanced.com/forum/showpost.php?p=19016&postcount=52), I found out that all pages with CMPS integration (forum index, forumdisplay, threadview) suffer from duplicate data taken from vB.
If you check this page's html source (http://beta.35mm.org/forumdisplay.php?f=2), you'll find the code bellow where the vB content is wrapped by CMPS.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" lang="en">
<meta name="description" content="Main Forum Description" />
<title>35mm Beta - Main Forum</title>
In other pages there are also meta tags.
Update: forgot to say that I've also seen this issue in a couple of other sites.
tormodg
12-28-2004, 08:39 PM
I have the same issue. I sovled it by removing those tags from vBa.
Is that wise? What about all other pages *not* integrated with CMPS?
tormodg
12-28-2004, 08:45 PM
Don't know yet. I don't have any non-vb pages that are inside vBa yet. :)
I mean the other vB pages like usercp, buddylist, edit avatar, etc that are not integrated (or at least I suppose they are not because it doesn't make sense to integrate those).
Don't you have issues on those? And btw, how did you remove that from vB?
So, any update on this issue? Is it a bug, a design flaw, a feature?
I'm reluctant to remove the header on every page..
tormodg
01-19-2005, 01:35 PM
I'm currently updating my boards to vB 3.0.6 but I'll check after that.
tormodg
01-19-2005, 03:45 PM
Ooops. Big problems with my showthread.php...header completely gone. But it's there on every other page...so I'm not sure where the problem is. I have reuploaded the style I'm using, as well as the vBadvanced files, but it did not change anything.
tormodg
01-19-2005, 06:44 PM
It is a problem with the satellite style from vBstyles, and probably in other styles as well. The HTML bit seems to be included in several templates. When editing it out of the vba templates it works fine, as long as you remember to add it to any page that does not have it already.
tormodg
01-22-2005, 04:14 AM
I actually ended up doing it the other way - remove it from any template to be used by vBadvanced but not others. That should be the safest way, I assume.
tormodg
01-22-2005, 04:52 AM
I'll post a new thread about this. I have issues with the default style, too. Maybe I have done something wrong in my installation.
I actually ended up doing it the other way - remove it from any template to be used by vBadvanced but not others. That should be the safest way, I assume.
Errrrr... no, you shouldn't do it because it's the vBa template that encloses the vB ones.
Thread calling Brian! Thread calling Brian! C'min Brian! Over!
phlogiston
01-22-2005, 09:03 AM
the way I sorted the extra doctype & stuff was to edit the vba_cmps_include_bottom.php file.
FIND $nonindex = str_replace(
array(
and REPLACE that with $htmldef = '<html dir="'.$stylevar[textdirection].'" lang="'.$stylevar[languagecode].'">';
$nonindex = str_replace(
array(
$stylevar[htmldoctype],
$htmldef,
Basically just adding a couple of extra things that vba will strip out when creating the integrated page.
The first line sets up the <html dir="ltr" lang="en"> to be stripped using $htmldef and the $stylevar[htmldoctype] removes the extra DOCTYPE declaration.
I never had a problem with the meta tags or <title> being doubled up though - I guess it would be easy enough to add them into the array as well :)
Ahhh phlogiston, your method works fine, thanks =)
But CMPS is still putting the vB nocache headers into the html. Time to dig into the code...
tormodg
01-25-2005, 04:58 AM
Brian, could you PLEASE look at this issue.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.