rubenc
  • Posts: 27
  • Joined: 13/05/2009
Hello
I'm integrating YAF 2.2.3 to my web.form site AP.NET 4.5.2 vs2015

I can login but i cannot logout

the popup confrmation form is not appearing

Any Ideas?

rubenc
Sponsor
tha_watcha
  • Posts: 4133
  • Joined: 06/03/2010
This is probly caused by a CSS or javascript error. When you try to logout are you see any Javascript errors in the browser console?
UserPostedImage
rubenc
  • Posts: 27
  • Joined: 13/05/2009
This is what it shows>

HTML1300: Navigation occurred.
forum
SCRIPT438: Object doesn't support property or method 'selectmenu'
jquery.ForumExtensions.min.js (52,12296)
SCRIPT5007: Unable to get property 'settings' of undefined or null reference
forum (541,58)
jQuery.Deferred exception: Unable to get property 'Show' of undefined or null reference TypeError: Unable to get property 'Show' of undefined or null reference
at Anonymous function (http://cms.beta.winsir.net/forum/forum?g=forum:540:152)
at mightThrow (http://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.1.0.js:3508:10)
at Anonymous function (http://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.1.0.js:3576:12) undefined
SCRIPT5007: Unable to get property 'Show' of undefined or null reference
jquery-3.1.0.js (3793,3)
tha_watcha
  • Posts: 4133
  • Joined: 06/03/2010
When i go to your site (http://cms.beta.winsir.net/forum/) i see that you load jquery 1.11.2 which is not compatible with YAF.

Also i see that you try to load the jquery libary 3 times.
UserPostedImage
rubenc
  • Posts: 27
  • Joined: 13/05/2009
What version do I need to use?
These are my references in _references.js:


/// <autosync enabled="true" />
/// <reference path="../forum/scripts/ckeditor/ckeditor.js" />
/// <reference path="../forum/scripts/ckeditor/ckeditor_init.js" />
/// <reference path="../forum/scripts/ckeditor/ckeditor_initbbcode.js" />
/// <reference path="../forum/scripts/ckeditor/config.js" />
/// <reference path="../forum/scripts/ckeditor/styles.js" />
/// <reference path="../forum/scripts/installwizard.comb.min.js" />
/// <reference path="../forum/scripts/jquery.fileupload.comb.min.js" />
/// <reference path="../forum/scripts/jquery.forumextensions.min.js" />
/// <reference path="../forum/scripts/jquery.ui.datepicker-farsi.min.js" />
/// <reference path="../forum/scripts/jquery-2.2.3.js" />
/// <reference path="../forum/scripts/jquery-ui-1.11.4.min.js" />
/// <reference path="../forum/scripts/jquery-ui-i18n.min.js" />
/// <reference path="../forum/scripts/tinymce/tinymce_init.js" />
/// <reference path="../forum/scripts/tinymce/tinymce_initbbcode.js" />
/// <reference path="../forum/scripts/yafeditor/yafEditor.js" />
/// <reference path="../forum/themes/cleanslate/cleanslate.js" />
/// <reference path="../forum/themes/yafpro/yafpro.js" />
/// <reference path="../forum/themes/yafvision/yafvision.js" />
/// <reference path="../forum/themes/yafvision/yafvision_src.js" />
/// <reference path="../js/bootstrap.min.js" />
/// <reference path="../js/html5shiv.js" />
/// <reference path="../js/jquery.isotope.min.js" />
/// <reference path="../js/jquery.js" />
/// <reference path="../js/jquery.prettyphoto.js" />
/// <reference path="../js/main.js" />
/// <reference path="../js/respond.min.js" />
/// <reference path="../js/wow.min.js" />
/// <reference path="bootstrap.js" />
/// <reference path="jquery-3.1.0.js" />
/// <reference path="jquery-3.1.0.min.js" />
/// <reference path="jquery-3.1.0.slim.min.js" />
/// <reference path="modernizr-2.6.2.js" />
/// <reference path="respond.js" />

tha_watcha
  • Posts: 4133
  • Joined: 06/03/2010
Originally Posted by: rubenc 

What version do I need to use?



If possible use the latest version of jquery. the Minimum required version is 1.9.0


UserPostedImage
rubenc
  • Posts: 27
  • Joined: 13/05/2009
I don't know where you see that I use jquery version 1.11.2 and load it 3 times
my website uses jquery 3.1.0
And the slider that I use uses jquery 1.10.2

tha_watcha
  • Posts: 4133
  • Joined: 06/03/2010
Originally Posted by: rubenc 

I don't know where you see that I use jquery version 1.11.2 and load it 3 times
my website uses jquery 3.1.0
And the slider that I use uses jquery 1.10.2



look at the output your site try to load..


//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js
/js/jquery.js
http://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.1.0.js


the problem is that your site injects the jquery 3.1.0 but this happens after the forum scripts are loaded. and it looks like the forum loads version 1.11.2 which is causing the problem. Did you have setup the version 1.11.2 in the app.config in the yaf appSettings ?


UserPostedImage
rubenc
  • Posts: 27
  • Joined: 13/05/2009
Yes I had that in appSettings from the YAF.SampleWebApplication-v2.0-C by mistake
But I installed latest version of YAF (2.2.3)

Now I changed it to the version that comes in the script folder of the installation folder


  <add key="YAF.JQueryOverrideFile" value="jquery-2.2.3.min.js" />
  <add key="YAF.JQueryUIOverrideFile" value="jquery-ui-1.11.4.min.js" />
  <add key="YAF.JQueryUIOverrideLangFile" value="jquery-ui-i18n.min.js" />


still same error
:(
tha_watcha
  • Posts: 4133
  • Joined: 06/03/2010
You still have multiple loads of jquery. What happens when you remove the following code

<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.1.0.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
(window.jQuery)||document.write('<script type="text/javascript" src="../Scripts/jquery-3.1.0.js"><\/script>');//]]>
</script>

UserPostedImage
rubenc
  • Posts: 27
  • Joined: 13/05/2009
Ok
Visual Studio 2015 web.forms site uses jquery to work properly with bootstrap, I have version 3.1.0, I cannot remove it

I disabled all jquery loads, and I only left 3.1.0 at the begging, still I got the error:


SCRIPT438: Object doesn't support property or method 'selectmenu'
jquery.ForumExtensions.min.js (52,12296)
SCRIPT5007: Unable to get property 'settings' of undefined or null reference
forum (592,58)
SCRIPT438: Object doesn't support property or method 'PageMethod'
forum (291,9)


NOTICE that the error is in jquery.ForumExtensions.min.js
And Forum.aspx is a webpage that I have in the /forum folder to run the forum control


<%@ Page Title="<%$ Resources:Recursos, SiteMaster_Foro %>" 
    Language="C#" MasterPageFile="~/Site.Master" 
    AutoEventWireup="true" CodeBehind="Forum.aspx.cs" 
    Inherits="CMS_WebSite.Forum"
    MaintainScrollPositionOnPostback="true"
    Culture="auto"
    UICulture="auto" %>

<%@ MasterType VirtualPath="~/Site.master" %>

<%@ Register TagPrefix="YAF" Assembly="YAF" Namespace="YAF" %> 

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <YAF:Forum runat="server" ID="forum" BoardID="1" />
</asp:Content>


What I did is I went installing all versions of jquery down to 1.9.0, (the older you suggested) and got same result.
I left it with version 2.2.3 (same as in forum) for you to see it please

I think the error must be in the scripts from the forum from YAF-v2.2.3.0-Install.zip installation file.

The code that you want me to remove:

<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.1.0.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
(window.jQuery)||document.write('<script type="text/javascript" src="../Scripts/jquery-3.1.0.js"><\/script>');//]]>
</script>

is loaded by the forum control so I cannot remove it, only by removing <YAF:Forum runat="server" ID="forum" BoardID="1" />, then it loads

<script src="../Scripts/jquery-2.2.3.js" type="text/javascript"></script>
tha_watcha
  • Posts: 4133
  • Joined: 06/03/2010
Okay i try i again the forum injects the jquery js file here in the head section...


<link href="/forum/Content/forum.min.css" rel="stylesheet" type="text/css" /><link href="/forum/Themes/soclean/theme.css" rel="stylesheet" type="text/css" /><link href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jquery.ui/1.11.4/jquery-ui.min.js"></script>
</head>


that code...

<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.2.3.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
(window.jQuery)||document.write('<script type="text/javascript" src="../Scripts/jquery-2.2.3.js"><\/script>');//]]>
</script>


that code is not generated by the forum that comes from your site. as soon as i remove that everything works fine.
UserPostedImage
rubenc
  • Posts: 27
  • Joined: 13/05/2009
I think you should update the integration sample for the newest version of the forum
at least with vs 2015 and asp.net 4.5.1

Thank you anyways for your help

Update:
Ok, I found the solution, is very simple
just load your jquery version in the head section of the master page

<script src="Scripts/jquery-2.2.3.js" type="text/javascript"></script>


and comment the automatic load of it in the asp:ScriptManager control


<%--<asp:ScriptReference Name="jquery" />--%>


Thank you tha_watcha, I don't think I would have foud the solution without your assistance,
:wink:
Users browsing this topic
  •  guest
Forum Jump  
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved