November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
You still need the PageEntity in current releases, and yes - there are absolutely plans.
Is there any updated version of PageEntity for Community 4? Some functionality are changed in the community/common core.
E.g the Site, ISite is removed.
We're actually working on upgrading world to use community 4 at the moment. As we're using PageEntity on this site we're also updating the PageEntity code. When that work is done and it's working as it did in community 3 we'll share what we've come up with.
I have converted it to Community 4 and it works so far. But I have problems with PageEntityProvider that has to implement some more methods now, because the interface IEntityProvider is extended.
How are you guys doing with the Community 4 version of PageEntity? Would you mind sharing the code that you have come up with?
We're not done with porting PageEntity to community 4 yet. Lot's of other stuff keep interfering.
But the general idea is to remove all useage of ISite and SiteHandler since it not really used. Remove it from the constructors and method calls. Remove it from the stored procedures and you can also remove the site column in the database table (tblPageEntity?). Then you'll also need to change the general Community 4 changes (from static method to the new singleton object and so on).
Example:
//From:
CacheHandler.RemoveCachedObject("PageEntity", TPR_LIST_CACHE_KEY)
//To:
CacheHandler.Instance.RemoveCachedObject("PageEntity", TPR_LIST_CACHE_KEY);
Erik Engstrand also mentions above that IEntityProvider have additional methods that needs to be implemented.
This is how I implemented AddEntityInstance for example. The other new methods are similar:
public IEntity AddEntityInstance(IEntity entity)
{
if (!(entity is PageEntity))
{
throw new EPiServer.Common.Exceptions.NonCommittedEntityException(entity);
}
return PageEntityHandler.AddPageEntity((PageEntity)entity);
}
Hope that helps until we get the opportunity to share the entire code.
If someone else is looking for a Community 4 version of PageEntity, Nicklas solution can be found here: http://world.episerver.com/Blogs/Nicklas-Israelsson/Dates/2010/11/PageEntity-for-Community-40/
Thanks for linking to the blog post Stefan! I forgot about this thread otherwise I would have done the same.
One thing I miss about EPiServer Community 3 is the non existing relation with EPiServer CMS pagetypes. That is to be able to treat a CMS-page as a Community object e.g. add comments to a CMS page.
To solve this we've implemented Per Hemmingsonthe clever PageEntity module (http://world.episerver.com/Blogs/Per-Hemmingson/Dates/2009/6/Do-you-want-Community-features-on-your-CMS-pages-PageEntity-to-the-rescue/).
Now I'm just curios if the this is solved in Community 4 without the need for PageEntity? If not, are there any plans on implementing this type of connection in future Community releases? If not, how come?
Best regards Stefan