I'm not really sure how my saying "something in your application is loading another version of jquery over the top of the existing version" got turned into "tgext.menu is incompatible tg2.2", but I will categorically and emphatically state this in no uncertain terms:
tgext.menu is compatible with tg2.1.x and tg2.2. I have just tested it and confirmed it. When I create a new virtualenv, and install the tg2.2 rc in it, and then install tgext.menu, it works exactly as advertised. I get the navbar, and it works. I have checked the output HTML source, and this is the <script> block that appears. Compare it with yours, which produces an extra load of jQuery (specifically, 1.4.2). ------------------------------------ <script type="text/javascript" src="/tw2/resources/tw2.jquery/static/jquery/1.7.1/jquery.js"></script> <script type="text/javascript" src="/tw2/resources/tgext.menu.util/static/js/jquery.bgiframe.js"></script> <script type="text/javascript" src="/tw2/resources/tgext.menu.util/static/js/jquery.dimensions.js"></script> <script type="text/javascript" src="/tw2/resources/tgext.menu.util/static/js/jquery.positionBy.js"></script> <script type="text/javascript" src="/tw2/resources/tgext.menu.util/static/js/jquery.jdMenu.js"></script> ------------------------------------ Something in your application is causing an older version of jQuery to be loaded in the browser. When it does, it overwrites the version of jQuery that was loaded already, and obliterates the plugins. The end result is exactly what you saw happen: tgext.menu produces javascript errors. I don't know what in your application is causing it, but something in there is doing it. Remove that extra load of jQuery, and you will see that it works. On Sat, Apr 28, 2012 at 12:19 PM, Jean-Denis Girard <[email protected]>wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > ok, so it means tgext.menu is not compatible with tw2; tw2 is default in > tg2.2 applications, so tgext.menu is not compatible with tg2.2, right ? > > > Thanks, > - -- > Jean-Denis Girard > > SysNux Systèmes Linux en Polynésie française > http://www.sysnux.pf/ Tél: +689 50 10 40 / GSM: +689 79 75 27 > > Le 27/04/2012 19:12, Michael Pedersen a écrit : > > Aha, now I see the problem, and it makes perfect sense. > > > > In the file you sent, we have this block: > > ------------------------------ > > <script type="text/javascript" > > src="/tw2/resources/tw2.jquery/static/jquery/1.7.1/jquery.js"></script> > > <script type="text/javascript" > > > src="/tw2/resources/tgext.menu.util/static/js/jquery.bgiframe.js"></script> > > <script type="text/javascript" > > > src="/tw2/resources/tgext.menu.util/static/js/jquery.dimensions.js"></script> > > <script type="text/javascript" > > > src="/tw2/resources/tgext.menu.util/static/js/jquery.positionBy.js"></script> > > <script type="text/javascript" > > > src="/tw2/resources/tgext.menu.util/static/js/jquery.jdMenu.js"></script><script > > type="text/javascript" > > > src="/toscawidgets/resources/tw.jquery.base/static/javascript/jquery-1.4.2.js"></script> > > --------------------------------- > > > > Notice that there is an include of jquery 1.7.1 at the top, and an > > include of jquery 1.4.2 at the bottom. Looking at the URLs, we can also > > see that the first jquery is coming from tw2, while the second is coming > > from tw1. The ordering of the includes matters here: all of the > > jquery.jdMenu includes are being included/attached to the 1.7.1 copy of > > jQuery. Then, along comes the 1.4.2 copy of jQuery and overrides the > > variable $ resulting in all the plugins that were loaded becoming > > inaccessible. > > > > Something in your app is including tw1 and tw2. The problem is that tw1 > > is overriding tw2, and blocking out jdMenu from working. Fix that > > problem, and the whole problem we've been working on will go away. > > > > Mind you, there were still errors to be cleaned up, so I'm glad we > > reached this point. But the remaining problem, right now, looks to be > > inside your app. After reviewing tgext.menu, I couldn't even find a way > > for me to include tw1 code if tw2 code were enabled. > > > > -- > > Michael J. Pedersen > > My Online Resume: http://www.icelus.org/ -- Google+ > http://plus.ly/pedersen > > Google Talk: [email protected] <mailto:[email protected]> > > -- Twitter: pedersentg > > > > -- > > You received this message because you are subscribed to the Google > > Groups "TurboGears" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > > http://groups.google.com/group/turbogears?hl=en. > -----BEGIN PGP SIGNATURE----- > > iEYEARECAAYFAk+cGHYACgkQuu7Rv+oOo/hTWgCgpHU8lEugiSAPhdYDqAx1snCV > 40QAn0GmPnReext8HgEwI5Wpv+NhOvQB > =IWhn > -----END PGP SIGNATURE----- > > -- > You received this message because you are subscribed to the Google Groups > "TurboGears" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/turbogears?hl=en. > > -- Michael J. Pedersen My Online Resume: http://www.icelus.org/ -- Google+ http://plus.ly/pedersen Google Talk: [email protected] -- Twitter: pedersentg -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

