ErrorLogging
plugin?Cofoundry.Plugins.ErrorLogging.Data.ErrorLoggingDbContext
throwing the error, but that might be very well caused by something else first throwing the error. The fact that it uses a different DB context is interesting though.
Thanks @technical2cents for letting us know. The group by is required for the correct stats, but EF doesn't work well with GroupBy anymore. The fixed query should be:
queryModel.NumPages = await _dbContext
.PageVersions
.AsNoTracking()
.Where(v => v.PageTemplateId == query.PageTemplateId)
.Select(v => v.Page)
.Distinct()
.CountAsync();
I've committed the fix, thank you!
IAuthConfiguration
and the docs for DI tell you how to override stuff. If you need to inject anything into the startup pipeline the docs for that are here
LoginPath
to your SSO script. Your SSO script would have to use the Cofoundry data APIs to create a Cofoundry user if it doesn't exist and log them in. The SPA Sample shows how you can use the data APIs, in particular the RegisterMemberAndLogInCommandHandler
I have a class that will return a list of Page Directories for a select list in the DataModel
public class PageDirectoryOptionSource : IListOptionSource
{
private CofoundryDbContext dbContext;
public PageDirectoryOptionSource(CofoundryDbContext dbContext)
{
this.dbContext = dbContext;
}
public ICollection<ListOption> Create()
{
return (from p in dbContext.PageDirectories select new ListOption(p.Name, p.PageDirectoryId)).ToArray();
}
}
It will not inject the CofoundryDbContext. What alternative do I have build a list for the user based on information stored in the Cofoundry database? or What would be the best way to build a table of contents based on Page Directory?
Having this issue with hosting on an Azure App Service - I developed a Custom Entity similar to the Blog Post examples. After I publish a new custom entity, and not logged into Cofoundry - I see this error in the log when browsing to the root of the site or any of the post NOT logged in. I can login into the admin but when the site begins to behave like this, I can no longer go into the Custom Entities settings. The same error below occurs. I have seen some behavior with deleting the cookies specifically the ARRAFINITY cookies. This does not occur every when running locally.
Main
MESSAGE:
Entity of type 'Cofoundry.Domain.CustomEntityRoute' and identifier '2' could not be found.