File Manager javascript error

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
1/7/2010 1:27:55 PM
Gravatar
Total Posts 190

File Manager javascript error

I'm not sure what happened, but when I upgraded my source code and got the new file manager I was having an error 'undefined is not an object' and with a little reading in the forum I realized there was a .css file that needed to be added to the style.config. I did that and everything worked fine. I updated from svn again today, and I'm not certain that was exactly the point where the problem started, but I'm getting that same error again. I've checked and made sure the css file reference is still there so I'm puzzled why this error came back again. My script debugger says the problem is at line 1228 (in the jquery.qtfile.js file) with this line

if ($parent.children(Ul).size() == 0) {
 

anyone seeing anything similar?

Thanks,

John

1/7/2010 9:07:43 PM
Gravatar
Total Posts 190

Re: File Manager javascript error

Is nobody else getting this error? Every time I open the File Manager I get "undefined is null or not an object". I've spent most of the day trying to figure out what changed since yesterday (when it worked) and I am just out of ideas. I have added the style sheet to my style.config file. I didn't think there was anything else to do.

Thanks again,

John

1/7/2010 10:27:35 PM
Gravatar
Total Posts 190

Re: File Manager javascript error

Well, I figured one thing out. It's only on my machine that the File Manager doesn't work. After deploying the site to a test server, it works fine there (no changes to code.) I'm also using VS built in webserver. I don't know if that has any effect. But at least now I know it's working on the server.

1/7/2010 11:09:11 PM
Gravatar
Total Posts 125

Re: File Manager javascript error

something similar happens to me.   rightside icons of the file manager cannot be properly displayed in my local machine. After I deployed it to the host, everything works fine.

1/8/2010 6:12:06 AM
Gravatar
Total Posts 18439

Re: File Manager javascript error

Hi,

Does it happen in all web browsers?

Does changing the skin affect the issue?

One thing to keep in mind when working from svn trunk is that the skins in your site at /Data/Sites/1/skins do not get updated by svn updates. So periodically you may want to delete the skins from /Data/Sites/1/skins (except for custom ones) and copy the ones from /Data/skins into /Data/Sites/1/skins. However, you don't want to copy the hidden .svn files so you should right click the /Data/skins folder andchoose TortoiseSVN > Export and choose a place for it to copy the files, this will give you a clean set of skins with no .svn files and then you can copy these into /Data/Sites/1/skins.

If using custom skins you may want to periodically compare your skin to the latest included skins. For example if you've been updating from svn for a long time maybe you don't have the ScriptLoader control declared in your layout.master, you should copy it from an included skin.

Hope it helps,

Joe

1/8/2010 2:32:03 PM
Gravatar
Total Posts 190

Re: File Manager javascript error

It seems to be happening in IE8 and Firefox 3, so far as I've checked. It works fine on my server, but it doesn't like something with the folders on my machine when running in VS web server. I guess i can live with it till it gets resolved. It's not a high priority for me as long as it's working on the server. I don't really need to use the file manager on my own workstation. It may also not be a problem if you're using IIS locally instead of Visual Studio's web server.

1/9/2010 8:48:06 AM
Gravatar
Total Posts 18439

Re: File Manager javascript error

Hi,

I cannot produce the problem on my machine using IE 8 and the VS web server.

I recommend clear the browser cache on your local machine. I fixed some javascript issues after initially committing so you may have an older version of the js in your browser cache.

Hope it helps,

Joe

12/1/2010 3:24:25 PM
Gravatar
Total Posts 36

Re: javascript error

Hello Joe,

 Im trying to add javascript that i have. I was using it in DotNetNuke and it was working fine. For some reason mojoPortal is not finding the script and is not working in my actual skin. What would it be the best way to find the solution to this issue

12/2/2010 2:21:03 AM
Gravatar
Total Posts 108
Community Expert

Re: File Manager javascript error

Can you post your js code and say in wich part of your master page you put them

12/2/2010 8:50:37 AM
Gravatar
Total Posts 36

Re: File Manager javascript error

Here is the code! and i put them right in the bottom of the css paths, between the <head> tags

12/2/2010 8:51:27 AM
Gravatar
Total Posts 36

Re: File Manager javascript error

Here is the code! i put the code on the bottom of the css paths between the <head> tags.

 

<!--script type="text/javascript" src="<%= SkinPath %>js/jquery-1.4.2.min.js"></script-->
<script type="text/javascript" src="<%= SkinPath %>js/jquery.jcarousellite.js"></script>
<script type="text/javascript" src="<%= SkinPath %>js/jquery.easing.1.1.js"></script>
<script type="text/javascript">

var current_carousel_position = 1;

$(document).ready(function() {

/* initialize carousel */
$('.mycarousel').jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
speed:200,
easing: "easein",
visible: 1,
afterEnd: function(a) {
show_carousel_selected(current_carousel_position);
}
});

show_carousel_selected(current_carousel_position);

if(jQuery.browser.webkit || jQuery.browser.msie){
$("#mycarousel").css('marginTop', '-16px');
}

/*if(jQuery.browser.webkit){
$("#mycarousel").css('marginTop', '-16px');
}*/


});

/* ***************************************************************************************** */
function show_carousel_selected(index){
//alert ($('.slideshow .button-holder ul li').size());
index = ((index-1) % $('.slideshow .button-holder span').size()+1);
$('.slideshow .button-holder span').removeClass('on');
$('.slideshow .button-holder span#showcase-bullet-'+index).addClass('on');
}

</script>
 

12/2/2010 9:24:25 AM
Gravatar
Total Posts 2239

Re: File Manager javascript error

Hi,

Put your javascript after the <asp:ScriptManager control.

HTH,
Joe D.

12/2/2010 9:30:28 AM
Gravatar
Total Posts 36

Re: File Manager javascript error

Thank you,

 

and where do i put the <asp:ScriptManager control.?

12/2/2010 9:32:55 AM
Gravatar
Total Posts 108
Community Expert

Re: File Manager javascript error

Ok first of all, put your code in the bottom of the layout.master page, if you see the code of the page the scriptmanager is inside the form so if you put the script in the header the scriptmanager don't find the code. Secondly Jquery is already port of mojoportal so you don't need to add a reference to it. If you want to add the jcarousellite put this in the ClientScript folder under your data/sites/1/ClientScript/

 

I don't now if you new about it but, there is a  slideshow function in the html module, give a try, and may be you can achieve what you look with out adding the script.

12/2/2010 9:42:52 AM
Gravatar
Total Posts 18439

Re: File Manager javascript error

Hi All,

There is often confusion about adding javascript and especially jquery plugins. I talked about this a good deal in our last user group meeting and you could watch the video of that meeting for more detail.

I just created this document to make it easier to find out what you need to know.

http://www.mojoportal.com/adding-custom-javascript.aspx

Hope it helps,

Joe

12/2/2010 9:47:08 AM
Gravatar
Total Posts 36

Re: File Manager javascript error

germandb!

 

Regarding the slideshow function module, where can i find it? Sorry for all the questions im new to mojoPortal 

12/2/2010 9:52:00 AM
Gravatar
Total Posts 108
Community Expert

Re: File Manager javascript error

You can see the documentation hear http://www.mojoportal.com/htmlmodule.aspx

but basically insert a html module and in the settings click Enable Slideshow of Elements. The you create a div structure with the image inside

12/6/2010 12:59:14 PM
Gravatar
Total Posts 36

Re: File Manager javascript error

NO LUCK! Here is part of my code, and where i have put the crousel script in the bottom for the code.

 

<script type="text/javascript">
$(document).ready(function () {
$("span.downarr a").click(function () {
$("#toolbar").fadeOut();
$("#toolbarbut").fadeIn("slow");
});
$("span.showbar a").click(function () {
$("#toolbar").fadeIn();
$("#toolbarbut").fadeOut("slow");
});
$("span.downarr a, span.showbar a").click(function () {
return false;
});
});
</script>
<portal:AutoHidePanel ID="ah1" runat="server">
<div id="toolbarbut">
<span class="showbar"><a href="#">show bar</a></span>
</div>
<div id="toolbar">
<div class="toolbarleft">
&nbsp;
</div>
<div class="toolbarright">
<span class="downarr"><a href="#"></a></span>
<portal:AdminMenuLink ID="lnkAdminMenu" runat="server" />
<portal:FileManagerLink ID="lnkFileManager" runat="server" />
<portal:NewPageLink ID="lnkNewPage" runat="server" />
<portal:PageEditFeaturesLink ID="lnkPageContent" runat="server" />
<portal:PageEditSettingsLink ID="lnkPageSettings" runat="server" />
<asp:ContentPlaceHolder ID="pageEditContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
</portal:AutoHidePanel>
<portal:mojoGoogleAnalyticsScript ID="mojoGoogleAnalyticsScript1" runat="server" />
<portal:Woopra ID="woopra11" runat="server" />
<asp:ScriptManager>
<script type="text/javascript">

var current_carousel_position = 1;

$(document).ready(function () {

/* initialize carousel */
$('.mycarousel').jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
speed: 200,
easing: "easein",
visible: 1,
afterEnd: function (a) {
show_carousel_selected(current_carousel_position);
}
});

show_carousel_selected(current_carousel_position);

if (jQuery.browser.webkit || jQuery.browser.msie) {
$("#mycarousel").css('marginTop', '-16px');
}

/*if(jQuery.browser.webkit){
$("#mycarousel").css('marginTop', '-16px');
}*/


});

/* ***************************************************************************************** */
function show_carousel_selected(index) {
//alert ($('.slideshow .button-holder ul li').size());
index = ((index - 1) % $('.slideshow .button-holder span').size() + 1);
$('.slideshow .button-holder span').removeClass('on');
$('.slideshow .button-holder span#showcase-bullet-' + index).addClass('on');
}

</script>
</asp:ScriptManager>

</form>
</body>
</html>

12/6/2010 2:25:47 PM
Gravatar
Total Posts 108
Community Expert

Re: File Manager javascript error

First Remove the <asp:ScriptManager> tags. You alredy have a definition rigth after the form definition.

Second your sintaxis of the scrip manager control is wrong, you can read about it here

http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.aspx.

 

You must sign in to post in the forums. This thread is closed to new posts.