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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page Comments Conflict with other Scripts


Go to End


6 Posts   1235 Views

Avatar
steve_nyhof

Community Member, 224 Posts

15 February 2010 at 5:59am

Edited: 15/02/2010 6:00am

I have run into this before. I have made many sites where I use javascript in the head to run a rotating header image. When I turn on "Allow comments on this page?" or on a form page the header defaults to the background I have setup, and kills the script.

Now I am trying to get a slide out script running for a side menu, works great - until I add the page comments to the page.

When I look at the source code, I am running LiveZilla (chat script) on my pages. Been working fine even with comments turned on. However, when I look at the source code I see that when comments are turned on, it adds a number of scripts right in the middle of the Livezilla script. It does not effect the LiveZilla script, but it is killing my menu slide out script.

The menu script uses this google script...

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

Any ideas on this, or does anyone know where I might be able to control the scripts for the comments?
Thank you,
Steve

Avatar
Hamish

Community Member, 712 Posts

15 February 2010 at 7:42am

Add this to your _config.php:

PageCommentInterface ::set_use_ajax_commenting(false);

Avatar
steve_nyhof

Community Member, 224 Posts

15 February 2010 at 12:37pm

Edited: 17/02/2010 5:22am

Hi Hamish,

EDIT:

Sorry my last comment was related to the shopping cart I am working on. I will try this and see what I get for forms and comments.

Thank you,
Steve

Avatar
Solo

Community Member, 32 Posts

16 February 2010 at 2:04pm

Your problem is with conflict in different libraries or you have two times call of jquery. Try to Google that: "jQuery no conflict", or if you have two times call of jquery remove one

Avatar
steve_nyhof

Community Member, 224 Posts

17 February 2010 at 5:20am

That is a very big possibility. I am using several in the template, but should be called only with the correct IF. I will do some testing and checking the source.

Thank you,
Steve

Avatar
steve_nyhof

Community Member, 224 Posts

17 February 2010 at 5:23am

I have gone a different rout with a different script, but I will keep this in mind.