Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UrlSlug missing #97

Open
bogdan71 opened this issue Sep 14, 2021 · 1 comment
Open

UrlSlug missing #97

bogdan71 opened this issue Sep 14, 2021 · 1 comment

Comments

@bogdan71
Copy link

Brief bug description

It would seem that UrlSlug is part of the generated code from CMS and I see that it is part of final solution, but it never made it to the course scripts, probably in CIRepository that is used to generate CMS pages in database...??

What went wrong?
This breaks the live site by throwing an error on DoctorRepository.MapDtoProperties
trying to map to UrlSlug
dto.UrlSlug = page.UrlSlug;

@JanLenoch
Copy link
Contributor

Hi @bogdan71 ,

As I mentioned in #95, I originally had the conventional ASP.NET routing in the code base, alongside the CTB router-based code. (I didn't explain the conventional routing in the course script, however.) Then I removed the conventional routing from the code, leaving only the CTB router in there. The UrlSlug fields in generated model classes were a residue of the old era but they didn't do any harm in the solution.

I regenerated the model classes without the UrlSlug field. You probably started the Essentials module long ago, when the UrlSlug field resided in the MapDtoProperties method, and finished the course later.

Hopefully this explains the problem and you're free to continue with the course.

Jan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants