Problem with CState is undefined

Last post 02-28-2008, 10:40 PM by Kevin Rogers. 16 replies.
Sort Posts: Previous Next
  •  03-23-2006, 1:06 AM 17488

    Problem with CState is undefined

    Hi All,
     
    I am having problem with CState is undefined!
    Can anyone help me with this javascript error?
     
     
    Michael Tai
  •  03-23-2006, 3:31 AM 17489 in reply to 17488

    Re: Problem with CState is undefined

    Hi Michael, I'm also having this problem but they still don't know where is the problem.
     
     
    Good Luck!
     
    David
  •  03-23-2006, 4:01 AM 17490 in reply to 17488

    Re: Problem with CState is undefined

     
    RC
  •  03-23-2006, 5:35 AM 17491 in reply to 17489

    Re: Problem with CState is undefined

    Hi David,
     
    I found the function _CState in the file Gecko.js but there are no includes to the Javascript file  from the editor, is it that cause the problem? I am not very sure.....
     
    Michael
     
  •  03-23-2006, 6:07 AM 17493 in reply to 17489

    Re: Problem with CState is undefined

    No...I found that's not the cause of the error.
    I hope they can get this problem fixed ASAP so that I can start using it!
     
    Michael
  •  03-23-2006, 6:18 AM 17495 in reply to 17491

    Re: Problem with CState is undefined

    No that is not the problem, the js and the js.asp files are being loaded based on the browser is being used. No you will not find where they are doing it, but they are.
     
    #1 cause in _cstate is an incorrect path
     
    < !-- #include file = "CuteEditor_Files/include_CuteEditor.asp" -- >
    editor.FilesPath = "CuteEditor_Files"
     
    I store CE off the root in a directory called editor, notice the relative .. in the include
     
    < !-- #include file = "../editor/CuteEditor_Files/include_CuteEditor.asp" -- >
     
    I am including the script I use, I have these in an include file that I load where I need them. I have removed a few items that do not pertain to the illustration.  This example used the now deleted "enableall" configuration, so change it to what you need.
     
    Set editor = New CuteEditor
    editor.ID = "Editor1"
    editor.Text = content
       
    editor.DisableAutoFormatting = true
    editor.EditorOnPaste = "ConfirmWord"  
    editor.RemoveServerNamesFromUrl=true   
    editor.FilesPath = "/editor/CuteEditor_Files"
       
    editor.AllowUpload=true
    editor.AllowPasteHtml = true

    editor.ImageGalleryPath = "/user_upload/images/"
    editor.FilesGalleryPath = "/user_upload/documents/"
    editor.FlashGalleryPath = "/user_upload/images/"
    editor.MediaGalleryPath = "/user_upload/images/"
    editor.MaxImageSize = 100
    editor.AutoConfigure = "EnableAll"
    editor.BreakElement= "p"

    editor.ThemeType="office2003"  
    editor.Width = "100%"
    editor.DisableAutoFormatting =true
    editor.EditorBodyStyle = "font:normal 12px arial;"
    editor.EditorWysiwygModeCss = "/editor/CuteEditor_Files/gfeditorcss.css"  
    editor.Draw()
     
    #2 cause is the incorrect XMLDOM
     
    Download the following file http://www.az-technology.com/xmldom.zip, unzip it and run it in your web site. You can see what it should look like by running it on my site at http://www.az-technology.com/xmldom.asp. This will tell you what version of XMLDOM you have, idealy you should have 4.0, but that may or not be the case. You should get something like this.
     
    MSXML2.DOMDocument.5.0 can NOT be used. Reason: 006~ASP 0177~Server.CreateObject Failed~800401f3)
    MSXML2.DOMDocument.4.0 can be used.
    MSXML2.DOMDocument.3.0 can be used.
    MSXML2.DOMDocument.2.6 can be used.
    MSXML2.DOMDocument can be used.
    Microsoft.XMLDOM can be used.
     
    In this case, MSXML2.DOMDocument.4.0 can be used, if not then you will have to change the MSXML2.DOMDocument.4.0 reference in include_cuteeditor.asp, getstring.asp and tag.asp to the version you need. If MSXML2.DOMDocument.4.0 can not be used , then try first MSXML2.DOMDocument.
     
     
    RC
  •  03-23-2006, 8:17 AM 17498 in reply to 17495

    Re: Problem with CState is undefined

    Hi Robert,
     
    #1 cause
    It can't be the incorrect path using the demo files, isn't it? I have the same problem with sites actually using version 5.0 when I'm updgrading to 5.1, but they work with version 5
     
    #2 cause
    It could be this, in my server I have no installed MSXML2.DOMDocument.4.0 because we have been using MSXML2.DOMDocument with no problem at all. I can't risk to register that XMLDOM version only because a cuteeditor error is involved.
     
    I would like to receive an official confirmation about what is going on before taking any other measure. There some bugs apparently fixed in this version 5.1 and I'm desperately waiting for it.
     
    I just uninstalled the xml2.dom version 5 from my local machine and I have changed the references in the cute editor files to MSXML2.DOMDocument.3.0 and a different javascript error is coming up. I guess is still trying to use the XMLDOM 5 version because could be needed for some reason in the cuteeditor code calling a instruction not available in previous versions of the object.
     
    I don't know. The only thing I know is that I'm wasting my time finding out something Cutesoft should be doing it.
     
    David
     
  •  03-23-2006, 4:02 PM 17522 in reply to 17498

    Re: Problem with CState is undefined

    David,
     
    Have you successfully run the demo files in your server?
     
    Have you created the virtual directory for the testing?
     
    If so, can you explain your file structure?
     
    Keep me posted
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-23-2006, 4:31 PM 17523 in reply to 17498

    Re: Problem with CState is undefined

    David,
     
    I am not sure that XMLDOM 5 should be used,  I included it as a check. As far as I can tell version 5 is not available to the general public. I do know that the XML40 SP2 works fine for me. It can be found at
     
     
    CuteEdit should work with version 2.0, I have not had luck with 2.6 nor 3.0
     
    RC
  •  03-23-2006, 6:17 PM 17527 in reply to 17523

    Re: Problem with CState is undefined

    Hi all,
     
    actually reading this posting again and again and comparing it with my problem, I recognized that I have the same problem that David has. I overlooked the java script error in IE. I have the full error message switched off.
     
    I am getting the same error message "CState undefined".
     
    I have now istalled XMLDOM 4 on the server and still the same problem.
     
    MSXML2.DOMDocument.5.0 can NOT be used. Reason: 006~ASP 0177~Server.CreateObject-Fehler~800401f3)
    MSXML2.DOMDocument.4.0 can be used.
    MSXML2.DOMDocument.3.0 can be used.
    MSXML2.DOMDocument.2.6 can be used.
    MSXML2.DOMDocument can be used.
    Microsoft.XMLDOM can be used.
     
    What I can tell again: Everything runs fine, when the Cute editor files are in the same web and when I not use a virtual directory. I hope this finding the root cause.
     
    See my posts here:
     
     
    I hope some clever people can resolve this issue soon!
    I would also would appreciate a statement from cutesoft at least saying: Yes we understand and we are working on the problem instead of no reply.
     
    Volker Gottwald

    Volker Gottwald
  •  03-23-2006, 6:34 PM 17528 in reply to 17527

    Re: Problem with CState is undefined

    Guys,
     
    I am investigating this issue and will post a solution tonight.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-23-2006, 8:13 PM 17530 in reply to 17528

    Re: Problem with CState is undefined

    I setup my system to try the virtual method (incude virtual).
     
    I have to agree that there is an issue with cstate, it mimics a wrong path in the non virtual world. I will leave this one to the cutesoft people.
     
    RC
  •  03-23-2006, 10:15 PM 17533 in reply to 17530

    Re: Problem with CState is undefined

    Guys,
     
    Please try the steps below:
     
    Open the WinIS.js.asp and Gecko.js.asp file.
     
    And remove the following code:
     
    <!-- #include file = "include_Security.asp" -->
     
    If it works, I know the problem is.
     
    If not, please let me know the error message.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-24-2006, 3:40 AM 17537 in reply to 17533

    Re: Problem with CState is undefined

    Hi Adam,
     
    Good news. It now works!
    The content is displayed and I can modify, store it and read it again.
     
    Super, finally!
     
     
    Bad news:
    I have the wrong license! Before I see the content of the field I am getting the error message:
     
     
    You may know from earlier postings and mail, that I initially bought a domain license and the asked for what the best license would be to work with multiple webs on one server. Karen then upgraded my package and did send me the licence file I now have and charged me for what ever.
     
    I initially thought I could call cuteeditor with http://scripts.customsite.de (that where the files reside) and did know nothing about that I had to use the virtual directories method.
     
    SO. I have many customer websites, each with a different URL on one server and want to use CuteEditor. I thought I had explained this and thought I had the right license. Can you get me the right one now?
     
    Volker Gottwald

    Volker Gottwald
  •  03-24-2006, 5:03 AM 17545 in reply to 17537

    Re: Problem with CState is undefined

    Hi Volker, glad to see that you have got cuteeditor working.
     
    I got cutteditor works in my server, but it works horrible. I already installed the files as a new installation and I have copied the license file and I have changed the references to MSXMLDOM and the result is:
     
    Every time enter key is pressed (nothing happens if shift+enter is pressed):
     
     
    When I want to insert a link, the highlighted text is replaced for the url or the tag of the selected link:
     
     
     
    When I want to insert an anchor using the appropriate button in the toolbar, the anchor is inserted but the error below is popping up:
     
     
     
    And the last one and I guess is still there because Cutesoft didn't fix it yet is the dropdown forecolor and backcolor list:
     
     
    Please, Adam or anyone, could you show me a cuteeditor ASP demo of that customised dropdown list working? in any of your samples those dropdownlist are not shown.
     
        Default.config:
          <item type="dropdown" name="DropForeColor" command="DropForeColor" />  
          <item type="dropdown" name="DropBackColor" command="DropBackColor" />  
     
        Shared\Common.config:
      <DropForeColor>
       <item text="[[NotSet]]" value="null"></item>
       <item text="Black" color="Black" value="Black"></item>
       <item text="Red" color="Red" value="Red"></item>
      </DropForeColor>
      <DropBackColor>
       <item text="[[NotSet]]" value="null"></item>
       <item text="White" bgColor="White" value="White"></item>
       <item text="Red" bgColor="Red" value="Red"></item>
      </DropBackColor>
     
    I haven't checked other buttons in the toolbar and I suppose all these errors (not the last one) are produced because something wrong in the installation or the server, but for god sake, is an unzipped installation!! no setup.exe, no EXE files, no dll's to register, it shouldn't be so complicate!! and I already have a cuteeditor version 5 working in three diferent servers and I installed those files without any problem at all!!
     
    I'm sorry but is friday and I have wasted one and a half hour of my time testing and writing this and I'm completely pissed off and still at least 7 hours to go.
     
    David
     
  •  02-28-2008, 10:32 PM 37447 in reply to 17528

    Re: Problem with CState is undefined

    Well, it's been about 5 years and still it seems like you're still having trouble with the CState issue.  Can I get a little help regarding this problem?
     
    I've made a test page to test this out.  It has nothing on the page but the Cute Editor.  No JS, nothing.  If you visit the URL, the first time you go, it may be fine.  And if you SHIFT-REFRESH, it typically is fine too.  But if you simply refresh the page (F5 or click on the refresh button), you'll eventually see the error (if your IE has error reporting turned on).  It'll state missing ";" and "_CState is undefined". 
     
    The paths in my code are apparently correct since the editor works some of the time.  The Cute Editor folder is one level above the asp page that is displaying it.  Here is my code:
     
    content = gBody
        Dim editor
        Set editor = New CuteEditor
        editor.ID = "Body"
        editor.Text = content
        editor.FilesPath = "../CuteEditor_Files"
        editor.ImageGalleryPath = "/uploads/"
        editor.MaxImageSize = 1000
        editor.AutoConfigure = "Simple"
        editor.Width = 700
        editor.Height = 400
        editor.Draw()
     
    One of forum guests mentioned that it could be an XML issue.  I downloaded his script, ran it and this is the output:
     
    MSXML2.DOMDocument.5.0 can NOT be used. Reason: 006~ASP 0177~Server.CreateObject Failed~800401f3)
    MSXML2.DOMDocument.4.0 can NOT be used. Reason: 006~ASP 0177~Server.CreateObject Failed~800401f3)
    MSXML2.DOMDocument.3.0 can be used.
    MSXML2.DOMDocument.2.6 can be used.
    MSXML2.DOMDocument can be used.
    Microsoft.XMLDOM can be used.
     
    Any help would be appreciated.
     
    Kevin

  •  02-28-2008, 10:40 PM 37450 in reply to 37447

    Re: Problem with CState is undefined

    It pays to read things twice apparently.  I somehow missed Adam's post about removing the security include file from Gecko and WinIE.js.asp
     
    This appears to have solved the problem.

View as RSS news feed in XML