Error if parent field is selected

Hello!

Few day ago I have downloaded v2021 and converted project from v 2020. It worked ok first. After few days I did some changes in project and regenerated all pages. First page of the project (localhost and server) displays same json error:{“statusCode”:0,“error”:{“class”:“text-danger”,“type”:“Error”,“description”:“An internal error has occurred while processing your request.”}}After many experiments I have noticed that error disparages when I unselect field “Profile field (memo)” (leave empty). My original setting uses “users.profile” field. If I choose “users.profile” field again (anything else) then error appears again.

Same happens if I choose “emploees.Profile” field in Advanced security → User Login Options → “Profile field (memo)” setting.Please let me know why it can happen?

I have enabled Debug, Log SQL to file and Log error to file in Advanced settings then and regenerated all project pages. I couldn’t find any logged files or Log file folder itself. My upload folder which is set up in PHP → General Oprions->File Upload is empty.Here is the error from screen, same in F12 Network Response, nothing else (server php v 7.4, same error on windows localhost php v 7.2):{“statusCode”:0,“error”:{“class”:“text-danger”,“type”:“Error”,“description”:“/var/www/site/data/www/demo2021.site.ru/src/UserProfile.php(173): syntax error, unexpected ‘if’ (T_IF), expecting function (T_FUNCTION) or const (T_CONST)”}}UserProfile.php line 173 is:if ($this->loadProfileFromDatabase($usr)) {

Make sure you have already updated to the latest template, click on Tools → Update Template, after that re-generate ALL the script files, and try again.

Thank you!