This is a migrated thread and some comments may be shown as answers.

DNN install of RadEditor producing Error on postback

5 Answers 128 Views
Editor
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 29 Jul 2008, 11:27 AM

I installed the RadEditor some time ago and have sporadically recieved the error. "The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases." Ever since. We finally got it to reproduce with the repository module in DNN. If  after installing RadEditor as your default editor you go into Settings on the repository and then click update the error appears.
While Debugging we tracked it to line 509 of the Telerik RadEditor provider it's inside the RadEditor_Load Event Handler.
The Code reads
--------------------------------------------------------------------------
_editor.Parent.Controls.Add(New LiteralControl(String.Format("<link title='Telerik stylesheet' type='text/css' rel='stylesheet' href='{0}'></link>", editorPage.Server.HtmlEncode(cssOverrideUrl))))
Else IF
-------------------------------------------------------
Looks like in some instances the Provider is attempting to add the Control to the collection at an invalid time runing the postback. To fix it for now we changed our provider to read

Try
_editor.Parent.Controls.Add(New LiteralControl(String.Format("<link title='Telerik stylesheet' type='text/css' rel='stylesheet' href='{0}'></link>", editorPage.Server.HtmlEncode(cssOverrideUrl))))
Catch ex As HttpException
    'The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.
End Try

Any official Word on this? 
Anyone else noticing this?
 

5 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 31 Jul 2008, 07:46 AM
Any word on this? Is this a sanctioned fix for a Documented Bug or just something unique to me?



0
Rumen
Telerik team
answered on 01 Aug 2008, 08:54 AM
Hi David,

This is a confirmed bug with the editor in DNN and some Ajax scenarios. Could you please, download the latest DNN modules build Telerik.DNN.Modules_2008_2_723_dev.zip from the My Licenses -> My Purchases section under your Client.net account and see whether the problem still persists.

Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Todd Bollinger
Top achievements
Rank 1
answered on 13 Aug 2008, 10:30 PM
I have the new version and I still have the problem when I have a ajax call on a module control page.
0
Todd Bollinger
Top achievements
Rank 1
answered on 13 Aug 2008, 11:57 PM
David,

I actually can't find where you made this code change. I'd love to implement the Telerik editor but I can't get past this error. If you could give me a little more direction from your code example.

Currently I installed the Telerik DNN module and enabled it. I've hunted through the regular source as well as the source files provided from the DNN module but can't find your code example anywhere.

Thank you
0
Todd Bollinger
Top achievements
Rank 1
answered on 14 Aug 2008, 12:06 AM
Ah HA!

Nevermind. I found it. Having used the module to install the telerik editor I didn't see where all the files were going.

Having found this page:
http://dnn.telerik.com/Support/radEditorHtmlproviderinstallation/tabid/49/Default.aspx

Explained where the file i was missing was... App_Code/RadEditorProvider.vb

Tags
Editor
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Rumen
Telerik team
Todd Bollinger
Top achievements
Rank 1
Share this question
or