Page 1 of 1

Help Needed

Posted: Fri Jan 17, 2014 11:27 am
by davedinburgh
Hello

I am not that great with websites and now I have a problem. I was trying to input some Google ‘Remarketing Tag’ code onto the site, it didn’t work so I deleted the code from where I inputted it (Content » Global Content Blocks » Edit Global Content Block: head-links) and now the site now looks strange and not the way it should. I do not know what I have done so not sure how to repair the damage. Would you be able to help me correct this problem?

The website is http://www.scottishadoption.org

Look forward to hearing your advice.

Re: Help Needed

Posted: Fri Jan 17, 2014 1:04 pm
by velden
Assuming you use the Global Content Block (GCB) to add the javascript portion in the header:

- Disable the WYSIWYG editor! It adds <p> tags which are not allowed in the <head> section. So remove the <p> and </p> tags.

- You probably removed the part that includes the jQuery library, so put that back in that same GCB.

- You probably removed the {cms_stylesheet} tag (or if you're on an old cmsms version: {stylesheet}).

Re: Help Needed

Posted: Fri Jan 17, 2014 1:20 pm
by davedinburgh
Hi Velden

Many thanks for getting in touch. I have no experience with code so please bear with me.

I have managed to delete the <p> and </p> from the code and the website is still the same.

It is the following that I am not sure about;

- You probably removed the part that includes the jQuery library, so put that back in that same GCB. - Where would I put this in the coded part?

- You probably removed the {cms_stylesheet} tag (or if you're on an old cmsms version: {stylesheet}). - Again where in the code would I put this?

I am really sorry that I don't know where to put these and it probably is really simple, I hope I am not bothering you with such simple questions.

Dave

Re: Help Needed

Posted: Fri Jan 17, 2014 1:49 pm
by velden
Well it's hard to guess what was there before you start 'fixing' :D things.

Add this in the GCB above the javascript:

Code: Select all

 
{cms_stylesheet}
<__script__ src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></__script>
NOTE: this forum adds some underscores in the __script__ tags. Remove those!

Re: Help Needed

Posted: Fri Jan 17, 2014 2:04 pm
by davedinburgh
I tired to add that code you suggested and it didnt work so I deleted it again and now the links on the homepage are not working. They just take me to a blank page. The links were working before.

This is the code that is in the section 'Content » Global Content Blocks » Edit Global Content Block: head-links'

Do you see anything missing or wrong? Not sure if this will help if you are not sure what is supposed to be there.

<__script__ type="text/javascript">// <![CDATA[
$(document).ready(function(){
$(".feature img,.featureR img,#rCol img").hover(function() {
$(this).stop().animate({opacity: "1.0"}, 'fast');
},
function() {
$(this).stop().animate({opacity: "0.9"}, 'fast');
});
});
// ]]></__script>
<__script__ type="text/JavaScript">// <![CDATA[
function jumpBox(list) {
location.href = list.options[list.selectedIndex].value
}
// ]]></__script>
<__script__ type="text/javascript">// <![CDATA[
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-35583757-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
// ]]></__script>

Hear from you soon.

Dave

Re: Help Needed

Posted: Fri Jan 17, 2014 2:06 pm
by davedinburgh
I am also now getting this message at the top of the CMS Control Panel page. Any idea what this means? How could i have mucked this up so much? AARRGGHH

Warning: Invalid argument supplied for foreach() in /home/scottis2/public_html/lib/classes/class.admintheme.inc.php on line 311

Re: Help Needed

Posted: Fri Jan 17, 2014 2:46 pm
by velden
Well it's hard to tell what there should be, but now it's a mess for sure.

According to my 'view page source' window there's some other code than you posted here.

Code: Select all

<__script__ type="text/javascript">// <![CDATA[
$(document).ready(function(), 'fast');
    },
    function() , 'fast');
    });
  });
// ]]></__script>
<__script__ type="text/JavaScript">// <![CDATA[
function jumpBox(list) // ]]></__script>
<__script__ type="text/javascript">// <![CDATA[
var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-35583757-1']);
  _gaq.push(['_trackPageview']);
  (function() )();
// ]]></__script>

Re: Help Needed

Posted: Fri Jan 17, 2014 2:50 pm
by davedinburgh
Any suggestions then on how I can turn back time and sort this mess out?

Re: Help Needed

Posted: Fri Jan 17, 2014 3:29 pm
by velden
I would suggest to ask someone who knows a little more about websites in general and CMSMS to fix it for you (if it needs to be done quick).

However, no one can know for sure what was in the GCB before unless you have a database backup.

Re: Help Needed

Posted: Fri Jan 17, 2014 3:35 pm
by davedinburgh
Hi Velden

Thanks for all of your suggestions. I have managed to speak to someone who say they can reset the page to the way it was yesterday when the last back up was done so it will be fine soon. They said that I Must have deleted some extra code when I deleted the original Google code the first time around. So all will be fine soon. Hopefully.

I appreciate your advice and help so huge thanks! ::)

Dave