Sitecore Glass Mapper always null

前端 未结 3 1900
广开言路
广开言路 2020-12-20 19:37

I am using Sitecore Glass Mapper for a new project I\'m setting up. We are using Sitecore 7.2, latest version of Team Development for Sitecore (TDS) code generation and the

3条回答
  •  无人及你
    2020-12-20 20:03

    Did you check your Sites.config and the default language for this website? There could be a difference between the language which is defined in your Sitecore languages folder and your configuration.

    I had a similar problem with one of my projects where I changed the Sitecore.Context.Language to "nl" instead of "nl-NL". The glass mapper will return null, but Sitecore.Context.Database.GetItem will return an object in this case.

提交回复
热议问题