Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andrei Avram 12 posts 85 karma points
    Nov 02, 2015 @ 15:42
    Andrei Avram
    0

    GlassMapper in Umbraco 7

    Hello guys,

    Did anyone get Umbraco 7 working with GlassMapper. I'm having a hard time trying to get these two working together.

    After configuring Castle Windsor in my solution (creating the custom Controller Factory etc.) I tried defining a base controller to be used. I followed the principle described here: http://bluetubeinc.com/blog/2014/6/glass-mapper-and-umbraco-7

    However, when trying to execute the action, I keep getting the error that the Glass.Mapper.Umb.IUmbracoService is not registered.

    Can anyone help? Does anyone have a working repo that includes Umbraco 7 and Glass?

    Many thanks, Andrei

  • Mark Radford 7 posts 30 karma points
    Nov 15, 2015 @ 16:23
    Mark Radford
    1

    Hi Andrei,

    Which version of Umbraco are you using? I've been happily using Glass Mapper with version 7.2.8, but today I tried to upgrade to version 7.3.1 and suddenly everything fell apart.

    I had to remove my IUmbracoService declaration from Castle Windsor and create instances of the service when I needed them instead. Unfortunately, I ran into other problems that made me give up on it. Some of the specifics are below.

    So - the way I see it, you have two options: Set up your site with Umbraco 7.2.8 rather than 7.3.1, or don't use Glass Mapper.

    Personally, if I wasn't so far along with the project I'm building, I'd be ditching Glass, but it's too late to rebuild all my views and so on now. :(

    Specifics: It looks like Glass Mapper tries to create services like Umbraco.Core.Services.MediaService and Umbraco.Core.Service.ContentService if it can't find them. The constructors for these have changed (they need a lot more now, like IDatabaseUnitOfWorkProvider and lots of other things), which means Glass can no longer do this its self.

  • cheil 10 posts 90 karma points
    Jan 08, 2016 @ 22:39
    cheil
    0

    I had spent the last few hours trying to figure out why that same tutorial no longer worked. Finally came to the same conclusion you made, and am relieved that I wasn't the only one. Good to know exactly when this break happened.

    What ORM is the most recommended? Is there an official Umbraco ORM?

  • Andrei Avram 12 posts 85 karma points
    Nov 26, 2015 @ 12:33
    Andrei Avram
    0

    Thanks for the reply.

    I was trying to make it work with Umbraco 7.3.1 and had the same issues with the Umbraco services depending on lots of stuff that is not resolved with Glass Mapper's Castle Windsor setup.

    I've been using Glass with Sitecore in a number of past projects and had no issues and was hoping for a similar experience with Umbraco. Unfortunately, it's not the case. Glass for Umbraco feels rather incomplete (to say the least)

    I think I'm going to ditch Glass and use some other ORM like Ditto

Please Sign in or register to post replies

Write your reply to:

Draft