Cannot Insert image through Umbraco RichText editor - umbraco

The problem regarding richtext editor in Umbraco 4.
I am not able to add images through the RichText editor. When i click on the add image icon on the rich text editor, the popup panel displays an error (find in resource number 2).
The RichText editor datatype is using Tinymce3 as its type.
The resources ihave used and did not solve the problem.
1) http://our.umbraco.org/forum/using/ui-questions/39103-Problem-with-Rich-Text-Editor-and-Inserting-Images
2) Rich Text Editor and Inserting Images getting error
What i have done(they did not work):
a) resaved the RichText editor datatype with different Type,
b) deleted the RichText editor(bad mistake) and recreated it,
c) copied the code of insertimage.aspx from different projects wherever the RichText editor is working,
Kindly, have a look at the error image i have attached with this question.
Any suggestion would be helpful.
Error
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
[No relevant source lines]
Source File: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\1096afd0\6b67abfd\App_Web_uploadmediaimage.ascx.c3c18f9f.5y91thdt.0.cs Line: 0
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
umbraco.cms.businesslogic.datatype.DataTypeDefinition.b__0(DataTypeDefinition x) +235
System.Linq.WhereArrayIterator`1.MoveNext() +42
umbraco.cms.businesslogic.datatype.DataTypeDefinition.GetByDataTypeId(Guid DataTypeId) +311
umbraco.controls.Images.UploadMediaImage..ctor() +88
ASP.umbraco_controls_images_uploadmediaimage_ascx..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\1096afd0\6b67abfd\App_Web_uploadmediaimage.ascx.c3c18f9f.5y91thdt.0.cs:0
ASP.umbraco_plugins_tinymce3_insertimage_aspx.__BuildControlMediaUploader() in c:\work\IU\trunk\src\International.Web.UI\umbraco\plugins\tinymce3\insertImage.aspx:187
ASP.umbraco_plugins_tinymce3_insertimage_aspx.__BuildControlpane_upload() in c:\work\IU\trunk\src\International.Web.UI\umbraco\plugins\tinymce3\insertImage.aspx:186
ASP.umbraco_plugins_tinymce3_insertimage_aspx.__BuildControlForm1() in c:\work\IU\trunk\src\International.Web.UI\umbraco\plugins\tinymce3\insertImage.aspx:150
ASP.umbraco_plugins_tinymce3_insertimage_aspx.__BuildControlTree(umbraco_plugins_tinymce3_insertimage_aspx __ctrl) in c:\work\IU\trunk\src\International.Web.UI\umbraco\plugins\tinymce3\insertImage.aspx:1
ASP.umbraco_plugins_tinymce3_insertimage_aspx.FrameworkInitialize() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\1096afd0\6b67abfd\App_Web_insertimage.aspx.43b758d9.qhb5uafm.0.cs:0
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +67
System.Web.UI.Page.ProcessRequest() +118
System.Web.UI.Page.ProcessRequest(HttpContext context) +98
ASP.umbraco_plugins_tinymce3_insertimage_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\1096afd0\6b67abfd\App_Web_insertimage.aspx.43b758d9.qhb5uafm.0.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +912
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +164
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18033

Two things that spring to mind:
Permissions
I would do the usual housekeeping check first. Ensure that the following accounts have modify permission on all of the site's folders:
NETWORK SERVICE
IUSR
IIS_IUSRS
Corrupted install
A final resort would be a re-install. Copy over all the files from your version of Umbraco. If this still doesn't work, point it at a new database and try re-installing a basic Umbraco website.
The idea here is to determine if it is a corrupted database record, or a missing/corrupted file.
Is the site a new one? Have you always stuck with the same version or recently upgraded?
Let us know if you have your own answer too please. Best of luck!

Related

Xamarin Error XA0009 - Format of Executable or Library is invalid

I am struggling to make an Android App, but it always seems to end in this particular failure:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Exception while loading assemblies: Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA0009: Error while loading assembly: bin/Debug/(projectname).dll ---> System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
at Mono.Cecil.PE.ImageReader.ReadImage () [0x0002d] in <1b827dd2cbec4ef6829dffcefdcd3b01>:0
at Mono.Cecil.PE.ImageReader.ReadImage (Mono.Disposable1[T] stream, System.String file_name) [0x0000a] in <1b827dd2cbec4ef6829dffcefdcd3b01>:0
at Mono.Cecil.ModuleDefinition.ReadModule (Mono.Disposable1[T] stream, System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00007] in <1b827dd2cbec4ef6829dffcefdcd3b01>:0
at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00073] in <1b827dd2cbec4ef6829dffcefdcd3b01>:0
--- End of inner exception stack trace ---
at Java.Interop.Tools.Diagnostics.Diagnostic.Error (System.Int32 code, System.Exception innerException, System.String message, System.Object[] args) [0x0000a] in :0
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Load (System.String fileName) [0x00045] in <9ca47d05131d4b8c85910dacd818f0c6>:0
at Xamarin.Android.Tasks.ResolveAssemblies.Execute (Java.Interop.Tools.Cecil.DirectoryAssemblyResolver resolver) [0x00123] in <3f37ea95794e430e91f10accab4cf241>:0 ((projectname))
I am wondering what on earth might be causing the error, as I have tried multiple solutions to avoid the error and it often turns up in such random ways.
Last time I got the error it occurred as follows:
I had a project with only two Activity-files and two Layout files.
I created a gridview in the other layout and tested it on the Android emulator -> all was working well.
I resized the gridview and tested the app with the emulator -> error mentioned above occurred.
I deleted the solution, restored a manual backup saved in an other location, and tested it -> it was working.
I repeated the procedure with the gridview -> error occurred.
Now, as I deleted the project and tried to restore the backup again, even the backup did not work anymore. I tried to build it, then clean it and build but every attempt to build it resulted now as an error.
I seem to get mystic errors from time to time ( like Emulator image stopped working after all I did was just add a button with the designer) but every time troubleshooting eventually comes down to this error and I have to scrap the project. I have been working with Xamarin now 18 hours this weekend and 4 hours have been coding and the rest trying to fix the never-ending errors.
I am using MacBook Pro and have tried running the solution from the default directory and external drive.
So in a nutshell: What causes the error mentioned above and can it be fixed or at least avoided?
I tried to google ( long and hard) but could not find a solution that would be of any help.
Ps. Sorry if the post was not correct, it is my first. Would not have posted in the first place but I am desperate.
Thank you for your patience to read all the way to here.

Could not load type 'ProtocolSupportModule'

I've found a boss-level error that forced me to become an active member of stackoverflow.
I am hosting an MVC app and on root level it works, however css and images are failing. Even when going to the image directly via URL I get the following error:
Could not load type 'ProtocolSupportModule'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Could not load type 'ProtocolSupportModule'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Could not load type 'ProtocolSupportModule'.]
System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +12510809
System.Web.Configuration.HandlerFactoryCache.GetTypeWithAssert(String type) +47
System.Web.Configuration.HandlerFactoryCache.GetHandlerType(String type) +18
System.Web.Configuration.HandlerFactoryCache..ctor(String type) +27
System.Web.HttpApplication.GetFactory(String type) +94
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +375
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
Okay so I figured this out.
Under handler mappings, the OptionsVerbHandler was set to allow all verbs under the request restrictions section. I set it to only allow the OPTIONS verb and created extra handlers for POST and GET.
UPDATE:
WHEN a GETHandler is specified on a folder with stylesheets or images the ProtocolSupportModule error occurs when the image/stylesheet is called. When no Gethandler is present on dll's views, the MVC app displays a verb rights error.
I got around this by setting the handlers on folder level. This is a bad way of doing it. Are there any better ideas? I am sure the MVC framework should handle this automatically?

Opening the 'Insert image' modal in Umbraco 6.1.3 causes NullReferenceException

When I hit the 'Insert image' button in the rich text editor bar, the modal opens but then an error page appears:
Details of exception: System.NullReferenceException: Object reference not set to an instance of an object
Stacktrace:
[NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.]
umbraco.controls.Images.ImageViewer.OnPreRender(EventArgs e) +70
System.Web.UI.Control.PreRenderRecursiveInternal() +83
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974
Versiondata: Microsoft .NET Framework Versie:4.0.30319; ASP.NET Versie:4.0.30319.17929
Running Umbraco 6.1.3 on localhost and on server, both give the error.
I have already tried to replace the umbraco.dll and umbraco.editorControls.dll with fresh ones, but to no avail.
I also checked all my datatypes, but none are corrupt (as per Rich Text Editor and Inserting Images getting error and http://our.umbraco.org/forum/using/ui-questions/39103-Problem-with-Rich-Text-Editor-and-Inserting-Images).
I am using uComponents, but I have the most recent version (5.5.0)
If this is an update from a previous version, check that the configuration settings are all present, especially any specific to the media folder. It sounds like a setting just isn't present.
Also, often I forget to "include" all the files in my visual studio project too, so when I do a publish, any new files don't get included.
I got this error when I upgraded an install from v6.1.1 to v6.1.6. Although the offcial instructions state that only the bin folder needs to be updated this is far from being the case. You also need to ensure you use the latest files under /Umbraco and also /Umbraco_client. If you check the namespaces in /Umbraco/Controls/Images, for example you'll see it now lives in a different namespace
'<%# Control Language="C#" AutoEventWireup="True" CodeBehind="ImageViewer.ascx.cs" Inherits="Umbraco.Web.UI.Umbraco.Controls.Images ... %>
to the original:
'<%# Control Language="C#" AutoEventWireup="true" CodeBehind="ImageViewer.ascx.cs" Inherits="umbraco.controls.Images.ImageViewer" %>'
I've been working with Umbraco for just over six months and in that time I've yet to see a document from them that is accurate or complete. FFS.

protobuf-net transcoder for EnyimMemcached problems

Is the transcoder from protobuf-net to enyim cache deprecated? distributed caching with protobuff-net
Setting my Enyim config just like this app.config causes an error when I try to start the MemcachedClient()
The same for using
transcoder type="ProtoBuf.Caching.Enyim.NetTranscoder"/
System.TypeInitializationException was unhandled by user code
HResult=-2146233036
Message=The type initializer for 'Enyim.Caching.MemcachedClient' threw an exception.
Source=Enyim.Caching
TypeName=Enyim.Caching.MemcachedClient
StackTrace:
at Enyim.Caching.MemcachedClient..ctor()
at Global.asax.cs:line 31
InnerException: System.Configuration.ConfigurationErrorsException
HResult=-2146232062
Message=The value of the property 'transcoder' cannot be parsed. The error is: Object reference not set to an instance of an object. (\web.config line 207)
Source=System.Configuration
BareMessage=The value of the property 'transcoder' cannot be parsed. The error is: Object reference not set to an instance of an object.
StackTrace:
at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Web.HttpContext.GetSection(String sectionName)
at System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName)
at System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at Enyim.Caching.MemcachedClient..cctor() in MemcachedClient.cs:line 25
InnerException:
Both installed via nuget and using the latest version available.
Yes (cough), of course that's there! Just see "protobuf-net.Enyim", i.e.
PM> Install-Package protobuf-net.Enyim
(or use the GUI client)
To initialize, you need to configure the transcoder to be an instance of ProtoBuf.Caching.Enyim.NetTranscoder (as per the original instructions). If you are doing this via configuration, note that the assembly for this type is now protobuf-net.Enyim. If I assume the configuration file uses standard notation, then that means you would need to specify (in the config):
<transcoder type="ProtoBuf.Caching.Enyim.NetTranscoder,protobuf-net.Enyim" />
Original answer:
The enyim transcoder is not currently in nuget; however - I will right now take it upon myself to resurrect that, by adding a separate NuGet package (reference EnyimMemcached and protobuf-net) that adds this back in.
Random question... any chance you can point me at a binary memcached download for testing?
One reason this has lagged is that when I first wrote the enyim transcoder, memcached was a simple "run this" - but last time I looked it had gone all "enterprisey", and I couldn't track down a simple package that just had the memcached server. If you can show me where that is now, I'll get it working this weekend.

SharePoint error: "File Not Found"

I have an ASP.NET 2.0 web project that lives within SharePoint 2007. A couple of days ago, I made two changes to several pages, the first change was to adding a script reference to a jQuery file inside of my script folder that I lives with in my web project.
The second change was where I replace all of my DatePicker controls from SharePoint's DateTime control and I had to add a <% Register....SharePoint.WebControls reference at the top of this one page.
After I have compiled the solution in release mode and deployed out to my production environment, I started to get a "File Not Found" error when I try to access the page from SharePoint. I have no idea what's going on. We have recycle the app pool and even the stack trace doesn't tell use that much. Below is a view of the stack trace that I received when accessing the page. Please help, I've been looking at this issue for days now.
File Not Found. at System.Signature._GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, IntPtr fieldHandle, IntPtr methodHandle, IntPtr declaringTypeHandle)
at System.Signature.GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, RuntimeFieldHandle fieldHandle, RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle)
at System.Signature..ctor(RuntimeFieldHandle fieldHandle, RuntimeTypeHandle declaringTypeHandle)
at System.Reflection.RtFieldInfo.get_FieldType()
at System.Web.UI.Util.GetNonPrivateFieldType(Type classType, String fieldName)
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildFieldDeclaration(ControlBuilder builder)
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
at System.Web.Compilation.TemplateControlCodeDomTreeGenerator.BuildMiscClassMembers()
at System.Web.Compilation.PageCodeDomTreeGenerator.BuildMiscClassMembers()
at System.Web.Compilation.BaseCodeDomTreeGenerator.BuildSourceDataTree()
at System.Web.Compilation.BaseTemplateBuildProvider.GenerateCode(AssemblyBuilder assemblyBuilder)
at System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider)
That's a familiar one. It's related to the version of System.Web.Extensions that's requested by the SharePoint DateTime control. It seems that it is using Ajax and you aren't referencing the right Ajax platform version.
Steps similar to the ones described here solved my problem:
http://paulsiu.wordpress.com/2009/03/04/file-not-found-error-when-you-select-new-webpart-after-installing-smartpart-13/

Resources