I've got some problems with the gravatar preview. At first I want to change to default image to something else, how can I do this?
Where can I see what the "/base/Blog4Umbraco/GetGravatarImage/" method does? What parameters can it take? And which file do I have to edit? I've found two files containing javascript which gets the Gravatar information: blog4umbraco.js and the AjaxCommentForm.ascx
The second think is, that I can't get a preview image of any existing
gravatar image, I can only see the default "G" image when I type in a
fantasy email adress. But if I add my real adress, which is registered
with gravatar I can't see my image and I'm not able to post my comment.
I'm only getting: "Your comment could not be posted, we're very sorry
for the inconvenience"
I've got the preview working now. I added this javascript to get the hash value from the email and changed the preview method from AjaxCommentForm.ascx to this:
But I still can't post my comment if I type in a valid email which is linked with a gravatar image. The preview shows my image and all fields are filled but I can't post my comment.
It seems that the CreateComment method returns 0 and the message "Your comment could not be posted, we're very sorry for the inconvenience" gets displayed. Another problem is, that I can't change the code from the CreateComment method because the code soulution is broken or something. Can't open it at all. :(
The umbracoLog looks fine. There are no errors after trying to add a comment. I don't have access to the windows log because it is running at a hosted machine.
I'll try to alter the code so that I can track where the problem is.
The problem is the regex that checks for a valid email "isValidEmail" in Base.cs
The regex does not allow any numbers in the domain name which would be perfectly valid. My email had a number in the domain name so I was refused to post a comment.
yes. i had the same problem with certain email address like [email protected] which has two '.' in it. Think the regex might need to be replaced with a better one.
@TaoistTotty, you can find the patch here. It's just a zip file with the changed code files. You can simply replace the original files and rebuild the hole solution.
I'm looking to implement your fix to allow .co.uk addresses to be used in comments. I'm wondering how to do this - can I just upload your 'Base.cs' and 'BlogLibrary.cs' files or do I need to set this up in VisualStudio and compile the whole thing as a project?
It depends on what project you are using. If you are using UComment you have to download the source files from codeplex and change the regex validation like I mentioned in this post. After changing that, you have to rebuild the visual studio solution and put the resulting dll into you umbraco bin-folder.
If you are using the blog4umbraco package you can do the same thing with the blog source files or you can download my patch and simply replace the two original files with the new ones and rebuild everything.
If you can't get it to work I can build the fixed dll by myself and upload it somewhere. Just let me know
Yes, just copy it into the bin folder and replace the old one.
After that you have to recycle the application pool so that the dll gets loaded. To do that, you can simply touch the web.config (just add a space at the end of the file or something).
Hi there. I've run into the same problem, being that I use an email with more than one "." in its address.
I've downloaded and replaced the Umlaut.Umb.Blog.dll in the "bin" folder, but when I do I find that the comment section within the dashboard UI has the following problem:
Could not load control '/usercontrols/Blog4Umbraco/CommentModeration.ascx'.
Does anyone have any ideas what I can do to get around this?
Could not load control '/usercontrols/Blog4Umbraco/CommentModeration.ascx'. Error message:
System.Web.HttpParseException: The base class includes the field
'UpdatePanel1', but its type (System.Web.UI.UpdatePanel) is not
compatible with the type of control (System.Web.UI.UpdatePanel).
---> System.Web.HttpParseException: The base class includes the
field 'UpdatePanel1', but its type (System.Web.UI.UpdatePanel) is not
compatible with the type of control (System.Web.UI.UpdatePanel). 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.TemplateControlCodeDomTreeGenerator.BuildMiscClassMembers()
at
System.Web.Compilation.BaseCodeDomTreeGenerator.BuildSourceDataTree()
at
System.Web.Compilation.BaseCodeDomTreeGenerator.GetCodeDomTree(CodeDomProvider
codeDomProvider, StringResourceBuilder stringResourceBuilder,
VirtualPath virtualPath) at
System.Web.Compilation.BaseTemplateBuildProvider.GenerateCode(AssemblyBuilder
assemblyBuilder) at
System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider
buildProvider) --- End of inner exception stack trace --- at
System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider
buildProvider) at
System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath
virtualPath) at
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath
virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
allowBuildInPrecompile) at
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext
context, VirtualPath virtualPath, Boolean noBuild, Boolean
allowCrossApp, Boolean allowBuildInPrecompile) at
System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext
context, VirtualPath virtualPath, Boolean noBuild, Boolean
allowCrossApp, Boolean allowBuildInPrecompile) at
System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at
System.Web.UI.TemplateControl.LoadControl(String virtualPath) at
umbraco.cms.presentation.dashboard.OnInit(EventArgs e)
I took out the ID="UpdatePanel1" reference and then it started saying something about versions not being compatible. I'm assuming asp.net versions?? Unfortunately I don't know enough about building dlls, but do you think it's something to do with Timsn's dll being built in within a different version of the .net I have running locally?
Just to confirm you are running blog4Umbraco (that's what the dll was built for)? Also, did you recycle the app pool (easy way is to put a space or blankline into web.config and save it) ?
Do you have .net 3.5 installed locally? If so that should be all you need unless there are other dependencies causing the error.
It could be that you have a different version of the blog4umbraco code installed.
Yeah it's a clean install of v4.0.3 with an install of the Blog4Umbraco_2.0.24.zip package and nothing else (clean SQL 2005 Express db too)
The only difference is I've dropped Timsn's Umlaut.Umb.Blog.dll (downloaded from this thread) in the bin folder overwriting the original dll (which when I revert to works - apart from the .co.uk email address issue).
I'm running asp.net 3.5 and I've "touched" the web.config file. Maybe I should go away and learn how to recompile from Timn's patched source files?
Blog4Umbraco Gravatar problem
Hi,
I've got some problems with the gravatar preview. At first I want to change to default image to something else, how can I do this?
Where can I see what the "/base/Blog4Umbraco/GetGravatarImage/" method does? What parameters can it take? And which file do I have to edit? I've found two files containing javascript which gets the Gravatar information: blog4umbraco.js and the AjaxCommentForm.ascx
The second think is, that I can't get a preview image of any existing gravatar image, I can only see the default "G" image when I type in a fantasy email adress. But if I add my real adress, which is registered with gravatar I can't see my image and I'm not able to post my comment. I'm only getting: "Your comment could not be posted, we're very sorry for the inconvenience"
I've got the preview working now. I added this javascript to get the hash value from the email and changed the preview method from AjaxCommentForm.ascx to this:
But I still can't post my comment if I type in a valid email which is linked with a gravatar image. The preview shows my image and all fields are filled but I can't post my comment.
It seems that the CreateComment method returns 0 and the message "Your comment could not be posted, we're very sorry for the inconvenience" gets displayed. Another problem is, that I can't change the code from the CreateComment method because the code soulution is broken or something. Can't open it at all. :(
I really don't know what's wrong with the comment posting, check the umbracoLog and windows event log for any exceptions.
The source of getGravatar is available on codeplex, it should not be difficult to tweak it so you'll get a different default image.
The umbracoLog looks fine. There are no errors after trying to add a comment. I don't have access to the windows log because it is running at a hosted machine.
I'll try to alter the code so that I can track where the problem is.
The problem is the regex that checks for a valid email "isValidEmail" in Base.cs
The regex does not allow any numbers in the domain name which would be perfectly valid. My email had a number in the domain name so I was refused to post a comment.
Aha, you might want to submit a patch, this is what MSDN has to say about an e-mail regex (scroll down to "Table 1. Common Regular Expressions").
I've submitted a patch, the validation works fine now.
yes. i had the same problem with certain email address like [email protected] which has two '.' in it. Think the regex might need to be replaced with a better one.
Timsn, I am seeing the same problem, do you have a copy of your patch available for others to use?
@TaoistTotty, you can find the patch here. It's just a zip file with the changed code files. You can simply replace the original files and rebuild the hole solution.
If you need help let me know.
Hi Tim,
I'm looking to implement your fix to allow .co.uk addresses to be used in comments. I'm wondering how to do this - can I just upload your 'Base.cs' and 'BlogLibrary.cs' files or do I need to set this up in VisualStudio and compile the whole thing as a project?
Thanks
It depends on what project you are using. If you are using UComment you have to download the source files from codeplex and change the regex validation like I mentioned in this post. After changing that, you have to rebuild the visual studio solution and put the resulting dll into you umbraco bin-folder.
If you are using the blog4umbraco package you can do the same thing with the blog source files or you can download my patch and simply replace the two original files with the new ones and rebuild everything.
If you can't get it to work I can build the fixed dll by myself and upload it somewhere. Just let me know
Cheers, Tim
Thanks Tim. I'm using blog4Umbraco. I'm not familiar with building dlls, so if you're able to load it somewhere that would be amazing!
Hi Dan, you can download the dll here.
That's brilliant, thanks Tim. So I literally just copy that dll to the bin folder and it's job done?
Yes, just copy it into the bin folder and replace the old one.
After that you have to recycle the application pool so that the dll gets loaded. To do that, you can simply touch the web.config (just add a space at the end of the file or something).
Perfect, thanks very much indeed.
Hi there. I've run into the same problem, being that I use an email with more than one "." in its address.
I've downloaded and replaced the Umlaut.Umb.Blog.dll in the "bin" folder, but when I do I find that the comment section within the dashboard UI has the following problem:
Could not load control '/usercontrols/Blog4Umbraco/CommentModeration.ascx'.
Does anyone have any ideas what I can do to get around this?
Thanks,
Barney
Hey Barney,
Does the CommentModeration.ascx actually exist in the usercontrols directory?
Jay
Hiya Jay,
Yeah it is there in the usercontrols folder.
This is the full error:
Could not load control '/usercontrols/Blog4Umbraco/CommentModeration.ascx'.
Error message: System.Web.HttpParseException: The base class includes the field 'UpdatePanel1', but its type (System.Web.UI.UpdatePanel) is not compatible with the type of control (System.Web.UI.UpdatePanel). ---> System.Web.HttpParseException: The base class includes the field 'UpdatePanel1', but its type (System.Web.UI.UpdatePanel) is not compatible with the type of control (System.Web.UI.UpdatePanel). 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.TemplateControlCodeDomTreeGenerator.BuildMiscClassMembers() at System.Web.Compilation.BaseCodeDomTreeGenerator.BuildSourceDataTree() at System.Web.Compilation.BaseCodeDomTreeGenerator.GetCodeDomTree(CodeDomProvider codeDomProvider, StringResourceBuilder stringResourceBuilder, VirtualPath virtualPath) at System.Web.Compilation.BaseTemplateBuildProvider.GenerateCode(AssemblyBuilder assemblyBuilder) at System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider) --- End of inner exception stack trace --- at System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at umbraco.cms.presentation.dashboard.OnInit(EventArgs e)
I took out the ID="UpdatePanel1" reference and then it started saying something about versions not being compatible. I'm assuming asp.net versions?? Unfortunately I don't know enough about building dlls, but do you think it's something to do with Timsn's dll being built in within a different version of the .net I have running locally?
Thanks for your time man,
Barney
Evening,
Just to confirm you are running blog4Umbraco (that's what the dll was built for)? Also, did you recycle the app pool (easy way is to put a space or blankline into web.config and save it) ?
Do you have .net 3.5 installed locally? If so that should be all you need unless there are other dependencies causing the error.
It could be that you have a different version of the blog4umbraco code installed.
Barney,
It looks like this is a .net 2.0 vs 3.5 issue.
Mike got the same error as you (see this post for confirmation) http://our.umbraco.org/projects/ucomment/using-ucomment/6456-Comments-not-saving?p=2
So I suspect you need 3.5 installed.
hth
Jay
Hey again dude :)
Yeah it's a clean install of v4.0.3 with an install of the Blog4Umbraco_2.0.24.zip package and nothing else (clean SQL 2005 Express db too)
The only difference is I've dropped Timsn's Umlaut.Umb.Blog.dll (downloaded from this thread) in the bin folder overwriting the original dll (which when I revert to works - apart from the .co.uk email address issue).
I'm running asp.net 3.5 and I've "touched" the web.config file. Maybe I should go away and learn how to recompile from Timn's patched source files?
Sorry our posts are crossing over. Thanks, I'll have a look in that direction...
I'm a bit gutted this is even an issue with this package :(
is working on a reply...