iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello,
I found a bug in WebTextEditor when using the integration with WebFileUploader.
What I was trying to do is to load dynamically an User Control in a panel of an .aspx page.
First, I tried to register my user control ("WebUserControl.acsx"), which did work fine:
<%@ Page Title="Integration with WebFileUploader" Language="C#" MasterPageFile="./DefaultMasterXHTML.master" AutoEventWireup="true" CodeFile="IntegrationWithWebFileUploader.aspx.cs" Inherits="WebTextEditor_IntegrationWithWebFileUploader" %> <%@ Register Assembly="ISNet.WebUI.WebTextEditor" Namespace="ISNet.WebUI.WebTextEditor" TagPrefix="ISWebTextEditor" %> <%@ Register Src="WebUserControl.ascx" TagName="UcUserControl" TagPrefix="uc1" %> <asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server"> <uc1:UcUserControl runat="server" ID="test"/> </asp:Content>
Then, I tried to load dynamically the user control, by adding an asp:panel instead of directly the user control.
The goal is to load dynamically an user control in the asp panel, like the following :
<%@ Page Title="Integration with WebFileUploader" Language="C#" MasterPageFile="./DefaultMasterXHTML.master" AutoEventWireup="true" CodeFile="IntegrationWithWebFileUploader.aspx.cs" Inherits="WebTextEditor_IntegrationWithWebFileUploader" %> <%@ Register Assembly="ISNet.WebUI.WebTextEditor" Namespace="ISNet.WebUI.WebTextEditor" TagPrefix="ISWebTextEditor" %> <%@ Register Src="WebUserControl.ascx" TagName="UcUserControl" TagPrefix="uc1" %> <asp:Content ID="Content1" ContentPlaceHolderID="content" runat="Server"> <asp:Panel ID="pnlTest" runat="server"> </asp:Panel> </asp:Content>
and by adding the following code in the code file:
Control ctrl = LoadControl("WebUserControl.ascx"); pnlTest.Controls.Add(ctrl);
Unfortunately, this second solution doesn't work causes an error : "Unable to initialize file uploader".
As we are working with a lot of different user controls, we can't afford to use the first solution. We MUST load our user controls dynamically.
I attached the User Control I Created and the updated page "IntegrationWithWebFileUploader.aspx" for loading the user control. In order to reproduce the problem, you can just integrate these files to VS2010 Solution WebTextEditor C# Samples.
Can you provide us with some help or send this case to your development team?
Best Regards,
Nicolas
Hello Nicolas,
I am able to replicate this issue. I will deliver this issue to our developer team.
Regards,Handy
Hello Handy,
Do you have any news regarding this issue?
I haven't received any response from our developer teams. I will send reminder/notification to them.
Do you have any news from your developer teams?
This becomes very urgent because our customer is starting to edit with webTextEditor...
Our developer teams are working on it now. I also sent new nofitication to them. Does your customer have a deadline? I will try to keep pushing.
Thank you for your help.
Yes, and the deadline is 22th February (next Tuesday).
Ok, Thank you for letting us know. We will do our best to fix this asap.
Here is the attached hotfixes. Please let me know if it also works on you or not.
I tried the hotfix and it worked! Thank you.
That is, I'm experiencing another bug: when I try to initialize fileUploaderSettings from the code-behind in C# like this
protected void Page_Init(object sender, EventArgs e) { // Images Library WebTextEditorMediaResourceGroup mediaResourceGroup = new WebTextEditorMediaResourceGroup(); mediaResourceGroup.Name = "media1"; mediaResourceGroup.Text = "Photos"; WebTextEditorResource resource = new WebTextEditorResource(); resource.Name = "Images"; // Get or create an new folder for the help page, depending on screen name and language resource.Url = "Images/"; resource.AllowUserUpload = true; mediaResourceGroup.Resources.Add(resource); textEditor.MediaResources.Add(mediaResourceGroup); // View Settings textEditor.ViewSettings.EnableHTMLView = true; textEditor.ViewSettings.EnableSplitView = true; textEditor.ViewSettings.EnablePreview = true; textEditor.ViewSettings.EnableDesignView = true; textEditor.FileUploaderSettings.DefaultUploadMediaResource = "Images"; textEditor.FileUploaderSettings.Enabled = true; textEditor.FileUploaderSettings.TotalUploadSizeLimit = 100000; // 100kb limit textEditor.FileUploaderSettings.FileTypes = "*.jpg;*.png;*.zip"; }
there still is the error "Unable to initialize file uploader"...
while letting this initialization in .ascx code it works :
MediaResources> <ISWebTextEditor:WebTextEditorMediaResourceGroup Name="media1" Text="Photos"> <resources> <ISWebTextEditor:WebTextEditorResource Name="Images" Url="Images/" AllowUserUpload="true" /> <ISWebTextEditor:WebTextEditorResource Name="Thumbnails" Url="Thumbnails/" AllowUserUpload="true" /> </resources> </ISWebTextEditor:WebTextEditorMediaResourceGroup> </MediaResources> <ViewSettings EnableHTMLView="false" EnableSplitView="false" /> <FileUploaderSettings Enabled="true" DefaultUploadMediaResource="Thumbnails" />
I attached the sample which is not working.
Can you also fix this?
Moreover,
You send us another hotfix for the WebTextEditor :
http://www.intersoftpt.com/Community/WebTextEditor/WebTextEditor-bookmark-link-corrupted/
is it possible to integrate this hotfix in a new release (I mean, to have the 2 hotfixes in the same dll?)
Thank You.
You can try to use our UpdateManager to get the latest hotfixes. It has been released. But you need to downgrade the older version before run UpdateManager. Otherwise, it would recognize that you already had the latest.
Or, you can keep one of the nightly build that we sent before. Please try to use the latest date. The nightly build is close with official version.
About your current issue, you should not define in PageInit. Please moved the code into textEditor_PreInitialize server side event. It works fine without the error.
Dear Handy,
I tried to move the code into textEditor_PreInitialize server side event.
However, I still have a message "File Uploader is not enabled" when I click the option "Insert from Computer" with the following code:
<ISWebTextEditor:WebTextEditor ID="textEditor" runat="server" Width="100%" Height="500px" EnableViewState="false" DefaultStyleMode="ElegantBlueStyle" OnInitializeToolBar="textEditor_InitializeToolBar" OnPreInitialize="textEditor_PreInitialize"> <FlyPostBackSettings PostControlState="False" PostHiddenFields="False" PostInputControls="True" PostViewState="False" /> <ToolBarSettings ToolBarMode="Complete" /> </ISWebTextEditor:WebTextEditor>
and:
protected void textEditor_PreInitialize(object sender, EventArgs e) { // init WebTextEditor Css WebTextEditorCssFile webTextEditorCssFile = new WebTextEditorCssFile { FilePath = Constant.StylePath + "/Documentation/helpPage.css", Type = WebTextEditorCssType.DesignerStyleSheet }; WebTextEditorCssFile webTextEditorCssFile2 = new WebTextEditorCssFile { FilePath = Constant.StylePath + "/Documentation/helpPage.css", Type = WebTextEditorCssType.RuntimeStyleSheet }; textEditor.RootTextEditor.CssFiles.Add(webTextEditorCssFile); textEditor.RootTextEditor.CssFiles.Add(webTextEditorCssFile2); // Images Library WebTextEditorMediaResourceGroup mediaResourceGroup = new WebTextEditorMediaResourceGroup(); mediaResourceGroup.Name = "media1"; mediaResourceGroup.Text = "Photos"; WebTextEditorResource resource = new WebTextEditorResource(); resource.Name = "Images"; // Get or create an new folder for the help page, depending on screen name and language resource.Url = VirtualPathUtility.ToAbsolute(Path.Combine(ConfigurationManager.AppSettings["DocumentationDirectory"], "Images/")); resource.AllowUserUpload = true; WebTextEditorResource resource2 = new WebTextEditorResource(); resource2.Name = "Thumbnails"; // Get or create an new folder for the help page, depending on screen name and language resource2.Url = VirtualPathUtility.ToAbsolute(Path.Combine(ConfigurationManager.AppSettings["DocumentationDirectory"], "Images/")); mediaResourceGroup.Resources.Add(resource); mediaResourceGroup.Resources.Add(resource2); textEditor.MediaResources.Add(mediaResourceGroup); // View Settings textEditor.ViewSettings.EnableHTMLView = true; textEditor.ViewSettings.EnableSplitView = true; textEditor.ViewSettings.EnablePreview = true; textEditor.ViewSettings.EnableDesignView = true; textEditor.FileUploaderSettings.DefaultUploadMediaResource = "Images"; textEditor.FileUploaderSettings.Enabled = true; textEditor.FileUploaderSettings.TotalUploadSizeLimit = 100000; // 100kb limit textEditor.FileUploaderSettings.FileTypes = "*.jpg;*.png"; }
Do you have any idea of what is causing file uploader to not be correctly enabled?
I run the sample without issue in here. Would you mind to send us a simple sample that replicates the issue? More details such as how to replicate the issue would also help.
I also run the sample without issue.
However, when I include it in our website, the message "FileUploaded is not enabled" appears (with the same code...)
Can you let us know your web.config settings? Please discard your runtime license before attached the files.If you deployed in IIS7 environment, please read how to configure WebTextEditor under IIS7 in our documentation.
I just found the bug: the panel containing webtexteditor was hidden at first page load and that was causing the error afterwards.
Can you send more details about the issue? I can run it well in here. Do we still talk about the same error? If not, please create a new thread regarding this issue.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname