Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lynn 5 posts 20 karma points
    Jul 28, 2009 @ 16:41
    Lynn
    0

    TinyMCE Editor problem - Firefox and IE

    Hello, 

    I have a property on the DocumentType that uses the RichtextEditor DataType.

    I have been trying to add on a tinyMCE editor onto my page using the following code snippet:

    IDataType dt = type.PropertyType.DataTypeDefinition.DataType;
    dt.DataEditor.Editor.ID = type.PropertyType.Alias + doc.UniqueId;

     However, whenever I get to this stage on Firefox and IE I always get the exception:

    [NullReferenceException: Object reference not set to an instance of an object.]
       umbraco.editorControls.tinyMCE3.TinyMCE..ctor(IData Data, String Configuration) +2224
    
    [ArgumentException: Incorrect TinyMCE configuration.
    Parameter name: Configuration]
       umbraco.editorControls.tinyMCE3.TinyMCE..ctor(IData Data, String Configuration) +6416
       umbraco.editorControls.tinyMCE3.tinyMCE3dataType.get_DataEditor() +95
    

    For some reason though Google Chrome is fine with the code and does not have this problem.  

    Through debug I can see all the variable of the DataType editor are set and all looks ok.

    Has anyone seen this problem or encountered something the same and managed to fix it?

    Thanks,

    Lynn.

  • Lynn 5 posts 20 karma points
    Jul 28, 2009 @ 16:54
    Lynn
    0

    Sorry, I made a mistake in the above post, I should have said that the DataEditor from the DataType is null when it gets to the above lines when debugging using Firefox.

    When I debug using Chrome the DataEditor in the DataType is inistialed to be TinyMCE editor.

  • Lynn 5 posts 20 karma points
    Jul 28, 2009 @ 17:49
    Lynn
    0

    Sorry, another update:  I have traced this error back to the line (134) in TinyMCE.cs

    if (("," + _advancedUsers + ",").IndexOf("," + UmbracoEnsuredPage.CurrentUser.UserType.Id + ",") > -1)

    Given that I am trying to use the TinyMCE Editor on the front end where there will be no users logged in (only members) so CurrentUser will always be null meaning that the code will always throw a null pointer exception.

    Does this mean that the TinyMCE editor cannot be used on the front viewing pages for members to enter data?

    I can see the way round it for me just now is to subclass that tiny MCE editor into my own code and perform a check round it to ty and fix it so that the null pointer is handled differently.  But from my understanding the tinyMCE should be avialble to use on the front end and back end, users or user-less.

    Sorry for the mulitple postings but I hope that someone can explain why the above line would have been written?

    Thanks, L.

  • Martin Bentzen 83 posts 145 karma points
    Sep 14, 2009 @ 09:10
    Martin Bentzen
    0

    Did you solve your problem? I had the same issue...

    Thanx, Martin

  • titorge 14 posts 28 karma points
    Sep 14, 2009 @ 22:45
    titorge
    0

    I´m struggling as well...

  • Martin Bentzen 83 posts 145 karma points
    Sep 15, 2009 @ 15:09
    Martin Bentzen
    0

    Okay - I think I solved my problem. I had some special danish chars in the membergroup name that protects the page. When viewed the access.xml file (in data dir), the membergroup was mis-encoded. I changed this, and my doc2form page with the TinyMce control works fine again.

    Maybe membergroup has an bug handling with special chars ?

    Regards

    Martin

  • Martin Bentzen 83 posts 145 karma points
    Sep 16, 2009 @ 10:04
    Martin Bentzen
    0

    Sorry - that was not the case... The problem occurs when you are not logged into Umbraco as a user. Try to login in to the backend first, and then return to the frontend site with the tinyMCE...

  • titorge 14 posts 28 karma points
    Sep 19, 2009 @ 12:43
    titorge
    0

    I've seen the same as you Martin. When I am logged in as a user my doc2form render the TinyMCE, but if i logg out, the TinyMce will not render.

    But my problem is that I use the TinyMCE in a Doc2Form(autoform) letting some members(assigned to a "editorgroup") add/edit newsarticles to a intranet. They are not Users, only members set up to be able to access the autoform page for adding content.

     

  • Erik Ernst 70 posts 90 karma points
    Mar 23, 2010 @ 13:08
    Erik Ernst
    0

    That's exactly the problem I have. But how did you solve it titorge?

     

    Rgds,

    Erik

     

  • Yannick Smits 321 posts 718 karma points
    May 11, 2010 @ 17:55
    Yannick Smits
    0

    Created issue on codeplex. Please vote here:
    http://umbraco.codeplex.com/workitem/27050

Please Sign in or register to post replies

Write your reply to:

Draft