Bug reports Found a bug? Post it here please.
Version 7.x > Bug reports > Webparts Sidebar firefox errors View modes: 
User avatar
Certified Developer v6
Certified Developer v6
szarouski - 10/5/2012 11:34:27 AM
   
Webparts Sidebar firefox errors
Hi,
First of all big thank you for work you've done on Kentico7, great job!

And here are error details
Kentico v7.0.2
Firefox v15.0.1

On design tab of any page - once sidebar loads all webparts you can scroll down the list and at some point you'll reach 'Loading...' message, which I believe is there for preloading. Once next portion of webparts loads in sidebar I'm getting following error:

Timestamp: 05/10/2012 12:12:04 PM
Error: TypeError: wptScrollContainer.spDisableSelection is not a function
Source File: http://oppi.78beta.com/CMSPages/GetResource.ashx?scriptfile=%7e%2fCMSScripts%2fDesignMode%2fWebPartToolbar.js
Line: 1


After this error I can't scroll the list anymore.

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Also, let's say I refresh design tab (so there are) and try to drag and drop item from sidebar to a webzone - I'm getting this error:

Timestamp: 05/10/2012 12:25:33 PM
Error: TypeError: jQuery.cookie is not a function
Source File: http://oppi.78beta.com/CMSPages/GetResource.ashx?scriptfile=%7e%2fCMSScripts%2fDesignMode%2fWebPartToolbar.js
Line: 1



So basically I can't use webpart sidebar at all.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 10/8/2012 1:43:08 AM
   
RE:Webparts Sidebar firefox errors
Hi,

I am unable to reproduce the issue. What plugins are installed in the browser? Have you tried disabling them? Are you able to reproduce this in other browsers and/or computers too?

Best regards,
Juraj Ondrus

User avatar
Certified Developer v6
Certified Developer v6
szarouski - 10/8/2012 8:43:15 AM
   
RE:Webparts Sidebar firefox errors
Hi Juraj, thank you for feedback.
I tried in Chrome and have same errors, so this is probably not a plugin issue. However when I created blank masterpage and tested there - all worked as expected. So should be some conflict between client side javascript and Kentico. I will do better research.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 10/8/2012 9:23:39 AM
   
RE:Webparts Sidebar firefox errors
Hi,

It is working fine on my corporate site - are you using any custom j-scripts or jQuery?
What web parts are on the page template you are editing?


Best regards,
Juraj Ondrus

User avatar
Certified Developer v6
Certified Developer v6
szarouski - 10/15/2012 1:34:42 PM
   
RE:Webparts Sidebar firefox errors
Hi,
I found where is the issue - I'm using AMD-loader called requirejs (http://requirejs.org/) and load jquery from cdn like this (example how it is setup in one of the inherited templates layout, I stripped out unnecessary code):


<cms:CMSWebPartZone ZoneID="zoneA" runat="server" />
<script src="/path-to-amd-loader/require.js"></script>
<script>
(function () {
'use strict';
var config = {
paths: {
jquery : ['//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min']
}
};

require.config(config);

require(['jquery'], function ($) {
//alert(new Date);
});
}());
</script>


This cause errors in sidebar. I believe it happening because of some conflict with Kentico jQuery code and jQuery loaded via amd.

User avatar
Certified Developer v6
Certified Developer v6
szarouski - 10/15/2012 1:45:44 PM
   
RE:Webparts Sidebar firefox errors
Or could be that jQuery plugins in Kentico don't have amd fallback (usually they don't).
Anyway, hope code above will help to find an error.

User avatar
Kentico Support
Kentico Support
Accepted solutionAccepted solution
kentico_jurajo - 10/22/2012 1:53:01 AM
   
RE:Webparts Sidebar firefox errors
Hi,

You need to load the custom scripts dynamically according to the view mode. You can use e.g. the Javascript web part and use a macro expression in the Visibility field where you will check the ViewMode and display/render this web part only in live site view mode.

Best regards,
Juraj Ondrus