Your code looks correct. Did you try to see if the catalog is created and displayed corrected?
/Q
I actually have the same error.
2014-10-22 17:48:22,165 [956] ERROR EPiServer.DataAbstraction.ScheduledJob: Job xxx.xxx.ScheduledJobs.LinkMediaToCatalogItems failed System.ArgumentNullException: The provided content link does not have a value. Parameter name: contentLink at EPiServer.Core.DefaultContentLoader.Get[T](ContentReference contentLink, LoaderSettings loaderSettings) at EPiServer.Commerce.Validation.MissingStartingPointLanguageValidator.<>c__DisplayClass2.<ShouldShowWarning>b__1(ICommerceRouter route) at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate) at EPiServer.Commerce.Validation.MissingStartingPointLanguageValidator.ShouldShowWarning(CatalogContentBase content) at EPiServer.Commerce.Validation.MissingStartingPointLanguageValidator.Validate(CatalogContentBase instance) at EPiServer.Validation.ValidationService.ValidateRecursively(Object instance, HashSet`1 visitedInstances) at EPiServer.Core.ContentProvider.Validate(IContent content, SaveAction action) at EPiServer.Core.DefaultContentRepository.Save(IContent content, SaveAction action, AccessLevel access)
We have tracked down this method, it might be releated, one of the routers returns null for RoutingStartingPoint:
private IEnumerable<ICommerceRouter> GetCommerceRouters() { if (_commerceRouters == null) { commerceRouters = partialRouteHandler.GetIncomingRouters(typeof(PageData)) .OfType<PartialRouter<PageData, CatalogContentBase>>() .Select(x => x.Router) .OfType<ICommerceRouter>(); } return _commerceRouters; }
Not really. Everything fails, even just updating the name of a catalog item from code. Everything works fine from the Catalog Manager though.
In this case my vague suggestion would be a close look on how routes are registered. Can you post your code here?
/Q
Wer're just calling CatalogRouteHelper.MapDefaultHierarchialRouter(RouteTable.Routes, false); in a IConfigurableModule
Hi,
We're also experiencing this when trying to update catalog content from a scheduled job. Same code more or less.
BR Jens
In that case I highly recommend you to contact our Developer service, so we can properly diagnose your problem. This sounds serious enough to take action, but without a reproducable case we won't be able to fix.
Thanks.
/Q
Seems like the problem was regarding the routing. Two workarounds seemed to work.
One was to remove:
CatalogRouteHelper.MapDefaultHierarchialRouter(RouteTable.Routes, false);
from the initialization.
The other was to add the host "*" in "Manage Websites".
I don't know if EPiServer has done anything more about this. It seems like a weird error and the error message is pretty bad at telling you what you're doing wrong.
Thanks. Wildcard works.
P.S. But it is weird that if you want to save some existing catalog entry, you need routing to work.
When I try to run this code I get an exception on the last row.
Message is: "The provided content link does not have a value. Parameter name: contentLink"
What am I doing wrong?