Counter Format Issue

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
KitchM
Power Poster
Power Poster
Posts: 328
Joined: Mon Dec 02, 2013 3:26 am

Re: Counter Format Issue

Post by KitchM »

I certainly did not do it to all pages, nor did I put in anything but the listed code. As anyone can see, the duplicate information is not in that code. That's my whole point.
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: Counter Format Issue

Post by JohnnyB »

KitchM wrote: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html>
<head>
</head>
</__body>
<!-- Add code here that should appear in the content block of all new pages -->
<__iframe src="http://www.census.gov/popclock/embed.ph ... clk=727707" frameborder="0" width="389" height="930">
</__iframe>
<__body>
</__html>
Just looks like you've mistakenly copied and pasted stuff that isn't needed there. The Template (under the Layout menu) will handle all of the HTML web page stuff like the < head > < body > etc.

I think following these steps will take care of the issue for you:

1) Under the Options tab while editing the page, turn off WYSIWYG
OR
Install TinyMCE via your Module Manager and then apply the fix I mentioned in your earlier post about the WYSIWYG editor that will allow iframe tags (http://forum.cmsmadesimple.org/viewtopi ... 28&t=68849).

2) Remove everything from that page's content box and paste only the iframe code obtained from the source's page at census.gov after completing step 1.
Last edited by JohnnyB on Wed Jan 08, 2014 3:55 pm, edited 1 time in total.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Counter Format Issue

Post by velden »

It's not on every page.

Check your templates, possibly Global Content Blocks (disable wysiwyg) and page default settings.
KitchM
Power Poster
Power Poster
Posts: 328
Joined: Mon Dec 02, 2013 3:26 am

Re: Counter Format Issue

Post by KitchM »

Go to any page at sierraclubswmg.org and check the page source. Every single page shows duplicate portions. I never editied the source code on those other main pages.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Counter Format Issue

Post by velden »

Well, I never had cmsms doing things itself. I see that at least the logo has been altered. Also a Startssl.com label is added somehow (not trusted ssl certicate by the way).

This is definitely not the default content.
KitchM
Power Poster
Power Poster
Posts: 328
Joined: Mon Dec 02, 2013 3:26 am

Re: Counter Format Issue

Post by KitchM »

And each and every one of those was done wysiwyg without my editing the underlying code whatsoever. And they were done with the default Tiny editor. Something is designed incorrectly, because it should be goof-proof. That's the whole point of using a system.

To be clear, anything done was done inadvertently.

And actually StartSSL is a trusted CA.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Counter Format Issue

Post by Dr.CSS »

I had to add an exception to get past your certificate so maybe not all that trusted...

I've seen the same duplicate DOCTYPE problem in the forum before, it had something to do with trying to use the template plugin in tinyMCE, go to extensions > tinyMCE > plugins tab and reset plugins...

If you need to use an iframe I would put it in a global content block that has the Use WYSIWYG: unchecked, the one at the top not the one at the bottom, this will disable tiny so it doesn't eat any code then put the GCB tag in the content where needed...
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: Counter Format Issue

Post by JohnnyB »

I'm also getting the SSL warning now too. The SSL is a Self-Signed certificate which will not be trusted. The free StartSSL CRT is not installed or installed incorrectly, possibly missing the CA which makes the issuer your web server and not StartSSL.
Image

But, anyway, that is another issue for another topic.

Let us know when you figure out where the duplicate content is - in the actual page content box, or the Layout Template(s). If you don't discover the source after investigation the previous suggestions, let us know -

1) Look at Site Admin, Page Defaults
2) Layout, Templates, look at each template being used
3) When editing a page, disable the WYSIWYG editor and check to make sure there is not any template HTML posted there.

Finally, the iframe source could have corrupt HTML that is causing problems. I don't think it does, but you might add the 'sandbox' attribute to the iframe tag:
sandbox="allow-same-origin allow-scripts"
Which will allow it to set javascript and cookies but not control or influence anything else on that page.

Code: Select all

<__iframe sandbox="allow-same-origin allow-scripts" src="http://www.census.gov/popclock/embed.php?component=counter&popclk=315430" width="389" height="938" frameBorder="0" allowtransparency="true"></__iframe>
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
KitchM
Power Poster
Power Poster
Posts: 328
Joined: Mon Dec 02, 2013 3:26 am

Re: Counter Format Issue

Post by KitchM »

Right you all are about the certificate. I botched it before and have to wait until thirty days are up and I can get a new one. Non-profits need a free one and StartSSL is the only one. However, it can not be edited once someone like me creates it incorrectly. I may have even taken it out all together and used the self-signed one. But I do know that Start is a good trusted source and I would trust them no matter what. 'Course we have little choice.

I am going to go thru and do the things recommended to get the pages cleaned up and then get back to you all. It may take a little time with testing.

Thanks for the tips.

But I will add that there is a lack of safeguards in the basic system that bothers me a great deal.
KitchM
Power Poster
Power Poster
Posts: 328
Joined: Mon Dec 02, 2013 3:26 am

Re: Counter Format Issue

Post by KitchM »

Okay, here's what I did and the results:
1. I reset plugins for TinyMCE. (Please see before and after screenshots.)
2. I created a global content block and inserted the code there. (See screenshot.)
3. I checked page defaults. (See screenshot.)
4. I checked the templates. (See screenshot.) Code from the only one used is below.
5. I did not edit any page except the Population page at this time.
6. I replaced the global content block code with the one given above and loaded page again.

Nothing made any difference, except the last one that caused code to appear on the page. (Check it out for yourself.)

CSSMenu Top + 2 columns:
{process_pagedata}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
{* Change lang="en" to the language of your site *}

{* note: anything inside these are smarty comments, they will not show up in the page source *}

<head>
<title>{sitename} - {title}</title>
{* The sitename is changed in Site Admin/Global settings. {title} is the name of each page *}

{metadata}
{* Don't remove this! Metadata is entered in Site Admin/Global settings. *}

{cms_stylesheet}
{* This is how all the stylesheets attached to this template are linked to it *}

{cms_selflink dir="start" rellink=1}
{cms_selflink dir="prev" rellink=1}
{cms_selflink dir="next" rellink=1}
{* Relational links for interconnections between pages, good for accessibility and Search Engine Optimization *}

{* the literal below and the /literal at the end are needed whenever there are {"curly brackets"} as smarty will think it's something to process and will throw an error *}
{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>
<!--[if lte IE 6]>
<style type="text/css">
#pagewrapper {width:expression(P7_MinMaxW(720,950));}
#container {height: 1%;}
</style>
<![endif]-->
{/literal}
{* The min and max page width for Internet Explorer is set here. For other browsers it's in the stylesheet "Layout: Top menu + 2 columns" *}

<!--[if lte IE 6]>
<__script__ type="text/javascript" src="modules/MenuManager/CSSMenu.js"></__script>
<![endif]-->
{* The above JavaScript is required for CSSMenu to work in IE *}
</head>
</__body>
<div id="pagewrapper">

{* start accessibility skip links, anything with the class of accessibility is hidden with CSS from visual browsers *}
<ul class="accessibility">
<li>{anchor anchor='menu_vert' title='Skip to navigation' accesskey='n' text='Skip to navigation'}</li>
<li>{anchor anchor='main' title='Skip to content' accesskey='s' text='Skip to content'}</li>
</ul>
{* end accessibility skip links *}

<hr class="accessibility" />
{* Horizontal ruler that is hidden for visual browsers by CSS *}

{* Start Header, with logo image that links to the default start page. Logo image is changed in the stylesheet "Layout: Top menu + 2 columns" *}
<div id="header">

{* this holds the name of the site on the right side *}
<h2 class="headright">{sitename}</h2>

{* a link back to home page and the header left image/logo, text is hidden using CSS *}
<h1>{cms_selflink dir="start" text="$sitename"}</h1>
<hr class="accessibility" />
</div>
{* End Header *}

{* Start Navigation *}
<div id="menu_vert">
{* stylesheet "Navigation: CSSMenu - Horizontal" *}
<h2 class="accessibility">Navigation</h2>
{menu loadprops=0 template='cssmenu.tpl'}
<hr class="accessibility" />
</div>
{* End Navigation *}

{* Start Search, the input "Submit" is using an image, CSS: input.search-button *}
<div id="search">
{search}
</div>
{* End Search *}

{* Start Breadcrumbs *}
<div class="crbk">
{* holds the right image, we need 2 divs to be able to make this site fluid, if it was fixed width we could use one div, one image *}

<div class="breadcrumbs">
{cms_breadcrumbs root='Home'}
<hr class="accessibility" />
</div>
</div>
{* End Breadcrumbs *}

{* Start Content *}
<div id="content">

{* Start Sidebar *}
<div id="sidebar">
<div id="sidebarb">
{content block='Sidebar'}

{* Start News, stylesheet "Module: News" *}
<div id="news">
<h2>News</h2>
{news number='3' detailpage='news'}
</div>
{* End News *}

</div>
</div>
{* End Sidebar *}

{* Start Content Area, the back1, back2, back3, hold the 3 outside images, main holds the 4th one, to make the box complete, if the template were fixed width not fluid we could use just 2 divs and 2 images, 1 top 1 bottom *}
<div class="back1">
<div class="back2">
<div class="back3">
<div id="main">
<div style="float: right;">{print showbutton=true script=true}</div>
<h2>{title}</h2>
{content}
<br />{* to insure space below content *}

{* Start relational links *}
{* note this is the right side, when you float: divs you need to have float: right; divs first *}
<div class="right49">
<p>{anchor anchor='main' text='^ Top'}</p>
</div>
<div class="left49">
<p> {cms_selflink dir="previous" label="Previous page: "}
{* The label parameter doesn't need to be there if you're using English, but is here to show how it's used if you don't want the English text "Previous page" *}

<br />
{cms_selflink dir="next"}
</p>
</div>
{* End relational links *}

<hr class="accessibility" />
<div class="clear"></div>
</div>
</div>
</div>
</div>
{* End Content Area *}

</div>
{* End Content *}

{* Start Footer. Edit the footer in the Global Content Block called "footer" *}
<div class="footback">
<div id="footer">
{* stylesheet "Navigation: FatFootMenu" *}
<div id="fooleft">
{menu loadprops=0}
</div>
<div id="footrt">
{global_content name='footer'}
</div>
<div class="clear"></div>
</div>
</div>
{* End Footer *}

</div>
{* end pagewrapper *}

<__body>
</__html>
Attachments
CMSMS Global Content Block creation.png
CMSMS TinyMCE plugins after reset.png
CMSMS TinyMCE plugins prior to reset.png
KitchM
Power Poster
Power Poster
Posts: 328
Joined: Mon Dec 02, 2013 3:26 am

Re: Counter Format Issue

Post by KitchM »

More......
Attachments
CMSMS page defaults - 2.png
CMSMS page defaults - 1.png
CMSMS page recreation.png
KitchM
Power Poster
Power Poster
Posts: 328
Joined: Mon Dec 02, 2013 3:26 am

Re: Counter Format Issue

Post by KitchM »

Damn limitations....
Attachments
CMSMS templates in use.png
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: Counter Format Issue

Post by JohnnyB »

In this screen shot: http://forum.cmsmadesimple.org/download ... &mode=view
The only thing that should be showing is your Global Content Block tag. Everything else is causing the duplicate HTML stuff.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
KitchM
Power Poster
Power Poster
Posts: 328
Joined: Mon Dec 02, 2013 3:26 am

Re: Counter Format Issue

Post by KitchM »

But that's what CMSMS puts in there, evidently to guide the user. How would the user know?
KitchM
Power Poster
Power Poster
Posts: 328
Joined: Mon Dec 02, 2013 3:26 am

Re: Counter Format Issue

Post by KitchM »

Went thru every page again and checked out the non-wysiwyg html code. Only found two that had extra code, but that didn't seem to make any visible differences. Although it is good to know the code is correct.

Thanks for that.
Post Reply

Return to “Layout and Design (CSS & HTML)”