Typo in Pagetype Code Generator File

Jacob Mallach asked on December 17, 2019 19:12

Hello,

We have a typo in a property name that is located within a code generator file that is breaking a piece of functionality. How should i go about fixing the typo? Can i edit this file directly?

Here is the file with the typo.

https://pastebin.com/zEB7eu0M

Thanks for the help.

Recent Answers


Roman Hutnyk answered on December 18, 2019 13:34

There are 429 lines of code - could you please be more precise on where exactly typo is?

Code generator does not keep source code files, but only generates them from what you've configured for page type, so you could save that code into a file system.

I'm doubt that code generator does typos and I'd recommend you to check property names in your page type and compare what you see in Kentico vs what is in code files (not the one you can see in generator, but one already saved in the file system).

P.S. You may always change whatever you need in generated code (again in the file sitting in file system)

1 votesVote for this answer Mark as a Correct answer

Jacob Mallach answered on December 18, 2019 17:14 (last edited on December 18, 2019 17:16)

Hi Roman,

Thanks for the feedback. Line 385 is where the typo resides, "PageSpecifcPhone". The miss-spelled "Specific" breaks some functionality on the ArticleDetail pagetype. Regarding your feedback to editing the generated code, is this recommended? I would think that editing the generated code file would have a chance of being overwritten, causing the error to return for future troubles?

0 votesVote for this answer Mark as a Correct answer

Jacob Mallach answered on December 19, 2019 17:22 (last edited on December 19, 2019 17:23)

Ok - I get it. The generated code file can be edited locally with no worries. I've done that and fixed the issue. Thanks for the feedback.

This thread also helped. https://devnet.kentico.com/questions/code-cannot-be-saved-on-a-precompiled-website

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.