November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
EDIT: The error is
and i thrown on
GetThumbnailUrl((EPiServer.Community.ImageGallery.Image)Container.DataItem)
It is only thrown when Container.DataItem is not null. That will say, it has an image.
Hi, it looks like this.
<imageGallery imageAbsoluteFilePath="C:\EPiServer\CommunityFolder\WebFormMediaRelateFolder\EPiServerCommunity\Modules\ImageGallery\Originals"
thumbnailVirtualFilePath="~/EPiServerCommunity/Modules/ImageGallery/Thumbnails"
imgExtension=".jpg"
imgMaxWidth="640"
imgMaxHeight="640"
saveOriginal="true"
maxUserImageQuota="0"
imgQuality="100">
<!--thumbnailBackgroundColor r="255" g="255" b="255" /-->
<!--watermark imageAbsoluteFilePath="" horizontalAlign="Right" verticalAlign="Bottom" format="Exact">
<canvas top="0" right="0" bottom="14" left="0" r="255" g="255" b="255" />
</watermark-->
</imageGallery>
Do you see an error after you upload portrait image for the user? Is file physically created on the disk?
The file is succesfully uploaded and is physically created on the disk.
EDIT: This is the error after upload of file (same error but on different page)
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:
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:
[NullReferenceException: Object reference not set to an instance of an object.] EPiServer.Community.Web.Administration.ImageExtensions.GetUrl(Thumbnail thumbnail) +48 EPiServer.Community.Web.Administration.PortraitControl.InitializePortrait(MyPage mp) +151 EPiServer.Community.Web.Administration.EditUser.SaveUser(IUser user) +953 EPiServer.Community.Web.Administration.EditUser.buttonSave_Click(Object sender, EventArgs e) +67 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9552602 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724 |
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18044
Interesting. Can you try to enable database tracing and see what SP named "spEPiServerCommunityMyPageGetPortraitImages" returns?
Let's see.
<?xml version="1.0" encoding="utf-16"?>
<events>
<event EventClass="10" CPU="0" Reads="72" Writes="0" Duration="1144" SPID="55" LoginName="dbUserEPI7WebFormTest">exec spEPiServerCommunityMyPageGetPortraitImages @intPage=1,@intPageSize=50,@intStatus=1,@strOrderBy=N'tblEPiServerCommunityImageGalleryImage.datCreated DESC '</event>
</events>
I just copied all info my express profiler got me :)
EDIT:
This is the info from when I uploaded this image above.
<event EventClass="10" CPU="0" Reads="23" Writes="9" Duration="349" SPID="57" LoginName="dbUserEPI7WebFormTest">exec spEPiServerCommunityImageGalleryAddImage @strHeader=N'kalle.jpeg',@strBody=N'',@intHeight=128,@intWidth=99,@intImageGalleryID=1026,@intOrder=0,@intAuthorID=2,@strLanguageID=NULL,@intStatus=1</event>
If I single step in the code I see that the absolute path has the correct path to an image when it crashes. Was it what you asked for?
Can you post node content (with childrens) for "/episerver.common/sites/site[@siteId={your id or *}]/uri" from web.config?
This part?
<episerver.common>
<sites>
<site siteId="*">
<cache defaultProvider="EPiServerCacheExpirationProvider">
<providers>
<add name="EPiServerCacheExpirationProvider" type="EPiServer.Common.Cache.CacheExpirationProvider, EPiServer.Common.Cache"/>
</providers>
</cache>
<security defaultProvider="HMACSHA256PasswordProvider" anonymousGroupId="2">
<providers>
<add name="CleartextPasswordProvider" type="EPiServer.Common.Security.CleartextPasswordProvider, EPiServer.Common.Security"/>
<add name="HMACMD5PasswordProvider" type="EPiServer.Common.Security.HMACMD5PasswordProvider, EPiServer.Common.Security"/>
<add name="HMACPasswordProvider" type="EPiServer.Common.Security.HMACPasswordProvider, EPiServer.Common.Security"/>
<add name="HMACSHA256PasswordProvider" type="EPiServer.Common.Security.HMACSHA256PasswordProvider, EPiServer.Common.Security"/>
</providers>
</security>
<uri defaultProvider="null">
<providers>
<add name="null" type="EPiServer.Common.Uri.UriProviderHandler+NullUriProvider, EPiServer.Common.Framework.Impl"/>
<add name="resources" type="EPiServer.Community.Web.Administration.ResourceUriProvider, EPiServer.Community.Web.Administration"/>
</providers>
</uri>
<syndication viewModeUriProviderName="" resourceUriProviderName="resources" feedUriProviderName=""/>
<integration>
<rolesToSynchronize>
<add name="*"/>
</rolesToSynchronize>
<rolesToTransfer>
<add name="Administrators"/>
<add name="CommunityAdmins"/>
<add name="CommunityModerators"/>
</rolesToTransfer>
</integration>
<entity>
<providers/>
<supportedTypes/>
</entity>
<framework>
<rating maxRating="10"/>
<tag>
<archiving interval="23:59:59" maxRelatedTags="5"/>
<tagCloud noiseLevel="100" cacheExpiration="23:59:59" minItemWeight="1" maxItemWeight="10" defaultItemCount="150"/>
</tag>
<activityLog logLevel="Custom">
<loggedTypes>
<add type="EPiServer.Common.Security.IUser, EPiServer.Common.Framework"/>
<add type="EPiServer.Common.Comments.Comment, EPiServer.Common.Framework.Impl"/>
<add type="EPiServer.Community.Blog.EntryComment, EPiServer.Community.Blog"/>
<add type="EPiServer.Community.Blog.Entry, EPiServer.Community.Blog"/>
<add type="EPiServer.Community.Blog.Blog, EPiServer.Community.Blog"/>
<add type="EPiServer.Community.Calendar.Calendar, EPiServer.Community.Calendar"/>
<add type="EPiServer.Community.Calendar.Event, EPiServer.Community.Calendar"/>
<add type="EPiServer.Community.Calendar.Invite, EPiServer.Community.Calendar"/>
<add type="EPiServer.Community.Calendar.Registration, EPiServer.Community.Calendar"/>
<add type="EPiServer.Community.Club.Club, EPiServer.Community.Club"/>
<add type="EPiServer.Community.Contest.Contest, EPiServer.Community.Contest"/>
<add type="EPiServer.Community.Contest.Question, EPiServer.Community.Contest"/>
<add type="EPiServer.Community.Contest.TextAnswer, EPiServer.Community.Contest"/>
<add type="EPiServer.Community.DirectMessage.Message, EPiServer.Community.DirectMessage"/>
<add type="EPiServer.Community.DocumentArchive.Content, EPiServer.Community.DocumentArchive"/>
<add type="EPiServer.Community.Expert.Question, EPiServer.Community.Expert"/>
<add type="EPiServer.Community.Expert.Answer, EPiServer.Community.Expert"/>
<add type="EPiServer.Community.Forum.Room, EPiServer.Community.Forum"/>
<add type="EPiServer.Community.Forum.RoomBase, EPiServer.Community.Forum"/>
<add type="EPiServer.Community.Forum.Message, EPiServer.Community.Forum"/>
<add type="EPiServer.Community.Forum.Topic, EPiServer.Community.Forum"/>
<add type="EPiServer.Community.Forum.Reply, EPiServer.Community.Forum"/>
<add type="EPiServer.Community.ImageGallery.Image, EPiServer.Community.ImageGallery"/>
<add type="EPiServer.Community.MyPage.MyPage, EPiServer.Community.MyPage"/>
<add type="EPiServer.Community.Poll.Poll, EPiServer.Community.Poll"/>
<add type="EPiServer.Community.Poll.Choice, EPiServer.Community.Poll"/>
<add type="EPiServer.Community.StarViral.Campaign, EPiServer.Community.StarViral"/>
<add type="EPiServer.Community.StarViral.Referral, EPiServer.Community.StarViral"/>
<add type="EPiServer.Community.VideoGallery.Video, EPiServer.Community.VideoGallery"/>
<add type="EPiServer.Community.VideoGallery.VideoComment, EPiServer.Community.VideoGallery"/>
<add type="EPiServer.Community.ImageGallery.ImageComment, EPiServer.Community.ImageGallery"/>
</loggedTypes>
</activityLog>
</framework>
<eventCounter active="true">
<events>
<add action="Add" name="UserAdded" groupName="User" type="EPiServer.Common.Security.SecurityHandler, EPiServer.Common.Security" event="CreatedUser" instanceMethod="get_Instance"/>
<add action="Remove" name="UserRemoved" groupName="User" type="EPiServer.Common.Security.SecurityHandler, EPiServer.Common.Security" event="RemovedUser" instanceMethod="get_Instance"/>
<add name="RegisteredMembers" type="EPiServer.Community.MyPage.MyPageHandler, EPiServer.Community.MyPage" instanceMethod="get_Instance" groupName="activity.members.registeredMembers" event="Register" action="Add"/>
<add name="UnregisteredMembers" type="EPiServer.Community.MyPage.MyPageHandler, EPiServer.Community.MyPage" instanceMethod="get_Instance" groupName="activity.members.unregisteredMembers" event="UserRemoved" action="Remove"/>
<add name="Image" type="EPiServer.Community.ImageGallery.ImageGalleryHandler, EPiServer.Community.ImageGallery" instanceMethod="get_Instance" groupName="activity.imageContent.image" event="ImageAdded" action="Add"/>
<add name="ImageComment" type="EPiServer.Community.ImageGallery.ImageGalleryHandler, EPiServer.Community.ImageGallery" instanceMethod="get_Instance" groupName="activity.imageContent.imageComment" event="ImageCommentAdded" action="Add"/>
<add name="Video" type="EPiServer.Community.VideoGallery.VideoGalleryHandler, EPiServer.Community.VideoGallery" instanceMethod="get_Instance" groupName="activity.videoContent.video" event="VideoAdded" action="Add"/>
<add name="VideoComment" type="EPiServer.Community.VideoGallery.VideoGalleryHandler, EPiServer.Community.VideoGallery" instanceMethod="get_Instance" groupName="activity.videoContent.videoComment" event="VideoCommentAdded" action="Add"/>
<add name="Blog" type="EPiServer.Community.Blog.BlogHandler, EPiServer.Community.Blog" instanceMethod="get_Instance" groupName="activity.blogContent.blog" event="BlogAdding" action="Add"/>
<add name="BlogComment" type="EPiServer.Community.Blog.BlogHandler, EPiServer.Community.Blog" instanceMethod="get_Instance" groupName="activity.blogContent.blogComment" event="EntryCommentAdded" action="Add"/>
<add name="ForumTopic" type="EPiServer.Community.Forum.ForumHandler, EPiServer.Community.Forum" instanceMethod="get_Instance" groupName="activity.forumContent.forumTopic" event="TopicAdded" action="Add"/>
<add name="ForumReply" type="EPiServer.Community.Forum.ForumHandler, EPiServer.Community.Forum" instanceMethod="get_Instance" groupName="activity.forumContent.forumReply" event="ReplyAdded" action="Add"/>
<add name="Clubs" type="EPiServer.Community.Club.ClubHandler, EPiServer.Community.Club" instanceMethod="get_Instance" groupName="activity.clubs" event="ClubAdded" action="Add"/>
</events>
</eventCounter>
</site>
</sites>
</episerver.common>
Not quite sure, but try upper case in name of this uri provider:
<add name="Resources" type="EPiServer.Community.Web.Administration.ResourceUriProvider, EPiServer.Community.Web.Administration"/>
Ok, sorry for wrong solution.
Seems like actually that you are missing baseUri attribute. Try this:
<add name="resources" type="EPiServer.Community.Web.Administration.ResourceUriProvider, EPiServer.Community.Web.Administration" baseUri="http://{my-server-name}" />
Did it! Thanks for the help!
How come this wasn't configured in the web config from when I isntalled community?
Hi all,
I need to show the original image from Image gallery;
Maybe somebody knows - is there a way to get URL to the original image (or thumbnail image with original image width and height :))?
Thanx in advance
I don't if I have same issue, but in our implemetation, the image uploaded by user is show randomly. On the page that display the images, some image display all the time, some images are not found. When I refresh the page, the images those are not found before now display correctly. Then if I refresh the page, those images are not found again.
Strange thing is same page, but on CMS server, images always display correctly. The issue only happen on web fronts which the configuration is the same in term of image gallery, VPP and so on.
- Will the baseUri help in this case? I ask this because it's make no different in development environment and stage because the images always shown
- How could you configure baseUri when you have multiple site install?
It should fail without baseUri or at least behave unexpectedly. But you can give a try and see if that helps.
Thanks Valdis,
What baseUri should I used if we have multiple site setup (3 sites with different url)? Should it the same as the default one?
I still dont know why it's works as expected all the time on all environment, but not the web fronts server :). How strange is it!
I have installed EpiServer Community on top of an episerver 7 WebForm project. I add an user without any problems but when I add a portrait to the user I get an exception. As follows.
Line 69: <div class="image"> Line 70: <asp:CheckBox ID="checkBoxSelected" runat="server" CssClass="imageSelector" /> Line 71: <img src="<%# GetThumbnailUrl((EPiServer.Community.ImageGallery.Image)Container.DataItem) %>" border="0" title="<%# AdministrationUtils.FormatString((string)DataBinder.Eval(Container.DataItem, "Body")) %>" onclick="SCImageGalleryOpenImageInfoWindow(<%# DataBinder.Eval(Container.DataItem, "ID") %>)" /><br /> Line 72: </div> Line 73: <asp:RadioButtonList ID="radioButtonListImagePublishState" CssClass="input" runat="server" RepeatColumns="1" RepeatDirection="Vertical" RepeatLayout="Flow">
This doesn't happen if I install the Relate+ site.
Is it a bug or do I have to anythingmore to get it work?
Has anyone had this problem before and how have you solved it?