Login | Forgot password | Register

X

What is OpenID?

OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.

With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.

For more information visit the official OpenID site.

Jump to:

17480 Posts in 4474 Topics by 1973 members

Archive

SilverStripe Forums » Archive » behaviour.js conflicts with mootools.js

Our old forums are still available as a read-only archive.

Page: 1
Go to End
Author Topic: behaviour.js conflicts with mootools.js 1207 Views
  • piksel
    avatar
    Community Member
    15 posts

    behaviour.js conflicts with mootools.js Link to this post

    behaviour.js seems to be used in front-end pages if you add $SilverStripeNavigator to your template. The problem is I'm trying to use mootools and they are conflicting...

    I guess it just means I can't have the SS Navigator menu on the front-end right? Or, I don't use mootools

  • Double-A-Ron
    avatar
    Community Member
    308 posts

    Re: behaviour.js conflicts with mootools.js Link to this post

    Yes, I've noticed the same. I've had to stop behaviour loading on any pages I'm using Mootools.

    I think the error is:
    Behavior is not defined.

    Must be a conflict or some sort, but I havn't delved deeper. It's best to avoid Mootools unless Prototype can't help you, as prototype is packaged with Silverstripe, and is totally incompatible with Mootools. (last I heard)

    Aaron

  • willr
    avatar
    Moderator
    1821 posts

    Re: behaviour.js conflicts with mootools.js Link to this post

    Prototype is used throughout the front end of the site - page comments, login, basically anywhere theres a form!.

    One of the things coming up is SS is moving to a jQuery JS library and away from prototype. I know quite a few of us in recent projects have spent some time stripping Behaviour and prototype out of the various front end components to provide us with a clean slate. Some of this work will be part of trunk soonish I guess unless its already in there!

    If you are trying to use mootools you will have to dig round and round digging out the old Behavior JS as it will pop up like a weed!

  • Ingo
    avatar
    Administrator
    508 posts

    Re: behaviour.js conflicts with mootools.js Link to this post

    both mootools and prototype share the same bad practice of cluttering the global namespace in javascript (with the $ function). one of many reasons why we're moving to jquery

    if you're sure you don't need behaviour.js (e.g. you don't want any clientside form validation), you can disable it by calling Requirements::block('jsparty/behaviour.js')

    1207 Views
Page: 1
Go to Top

Currently Online: AlfonsoGrondo, _Vince

Welcome to our latest member: AlfonsoGrondo

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.