Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Upgrading SilverStripe

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

upgrade 2.3 to 2.4.1 javascript issue?


Reply

832 Views

Avatar
webmmsd

1 August 2010 at 7:11am (Last edited: 1 August 2010 9:16am), Community Member, 10 Posts

I've done a little more investigating, maybe it's not javascript at all, but the code I paste (by clicking the html editor and pasting the code in) in is getting stripped.

Original Code I Paste in:
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style">
<a href="http://addthis.com/bookmark.php?v=250&amp;username=xa-4c5491220528eaa9" class="addthis_button_compact">Share</a>
<span class="addthis_separator">|</span>
<a class="addthis_button_facebook"></a>
<a class="addthis_button_myspace"></a>
<a class="addthis_button_google"></a>
<a class="addthis_button_twitter"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4c5491220528eaa9"></script>
<!-- AddThis Button END -->

After pasting and saving this is what code looks like:
<div class="addthis_toolbox addthis_default_style">
<a class="addthis_button_compact" href="http://addthis.com/bookmark.php?v=250&amp;username=xa-4c5491220528eaa9">Share</a>
<span class="addthis_separator">|</span>
<a class="addthis_button_facebook">&nbsp;</a>
<a class="addthis_button_myspace">&nbsp;</a>
<a class="addthis_button_google">&nbsp;</a>
<a class="addthis_button_twitter">&nbsp;</a></div>

It completly stripped the <script> which is I'm guessing why it's not working.
Any Ideas???
Odd that doing it this way worked on 2.3.

Be nice if I can keep my comments too!

--------------------------
Below is OLDER before I did some more investigating.

Upgrade mostly went smooth, except for what seems a minor issue (so far this is all I've found for issues), been using the "addthis" share button in the right column, which worked just fine before the upgrade. What's interesting is some of the old pages that haven't been update with the button, the button still works: http://www.sdmaritime.org/fos-cannon-battle/

Hit save and publish I get not much, even tried a different button style: http://www.sdmaritime.org/sailtest/

The other thing I noticed is some pages just didn't work properly (just in chrome & safari) but once I remove the addthis code it all went back to normal. See my png's with addthis and without addthis.

I'm guessing it's some kind of javascript conflict, but I'm not sure how to resolve this.

Or is there a better way for me to do a share button?

http://addthis.com - to see the code they use

Thank You - Alex

Attached Files