Programatically create page and using a field immediately fails

the link i added in the code above refers to getting page model in hooks or panel. and yes – i am creating a page in frontend but i comes back without the page-model anyway. so i had to get it myself.