I'm using a multi-site solution and one of the sites is in "en", "fr" and "nl". I can create a page under my designated parent on "en" but not on "fr" or "nl" even though the parent has at least a "fr" version.
I get this exception when I try to save the new page:
"ContentReference was not set to a valid value
Parameter name: contentLink
Actual value was ContentReference.EmptyReference."
I'm using EPiServer CMS 9.0.3.0 and this is the breakdown of the code that I'm using.
eventPage = contentRepository.GetDefault<StandardPage>(eventContainer); eventPage.Language = new System.Globalization.CultureInfo(language); eventPage.ExternalURL = "/event_id/" + eventObject.event_id; eventPage.PageName = eventObject.heading; eventPage.URLSegment = UrlSegment.CreateUrlSegment(eventPage); DataFactory.Instance.Save(eventPage, SaveAction.Publish, AccessLevel.NoAccess);
I've removed some code that fills in some more fields but I guess this is the more important part of the code.
Anyone that have had a similar problem?