Can't assign a parent page to an entry I was changing some entry types to allow for a parent/child structure when I realised that this was already something Craft could do natively. When I undid my changes and attempted to assign a parent page, I am given the following error: 


  Object of class Craft\Entry Model could not be converted to int.


I am still fairly new to Craft so I am quite limited in understanding exactly what I did to break it. I can still create and edit entries, I just can't set a parent page anymore.

******************************************************************************************************
2017/10/13 22:37:16 [warning] [application] There was a problem parsing the feed: cURL error 60: SSL certificate problem: unable to get local issuer certificate

******************************************************************************************************
2017/10/13 22:37:58 [error] [php] Object of class Craft\EntryModel could not be converted to int (C:\wamp64\www\craft\storage\runtime\compiled_templates\9a\9a68f00c27a5bff3f289231a8d85ef2d821f962bf46e9f246c88cce64dc926f2.php:19)
Stack trace:
#0 C:\wamp64\www\craft\app\etc\templating\BaseTemplate.php(26): __TwigTemplate_22da5c53ac1ef5202e2f12c05417214f2feda1f7c6b451fbb37fa9ade742e5bd-&gt;displayWithErrorHandling()
#1 C:\wamp64\www\craft\app\vendor\twig\twig\lib\Twig\Template.php(403): __TwigTemplate_22da5c53ac1ef5202e2f12c05417214f2feda1f7c6b451fbb37fa9ade742e5bd-&gt;displayWithErrorHandling()
#2 C:\wamp64\www\craft\app\vendor\twig\twig\lib\Twig\Template.php(411): __TwigTemplate_22da5c53ac1ef5202e2f12c05417214f2feda1f7c6b451fbb37fa9ade742e5bd-&gt;display()
#3 C:\wamp64\www\craft\app\services\TemplatesService.php(388): __TwigTemplate_22da5c53ac1ef5202e2f12c05417214f2feda1f7c6b451fbb37fa9ade742e5bd-&gt;render()
#4 C:\wamp64\www\craft\app\helpers\ElementHelper.php(122): Craft\TemplatesService-&gt;renderObjectTemplate()
#5 C:\wamp64\www\craft\app\services\ElementsService.php(1556): setUniqueUri()
#6 C:\wamp64\www\craft\app\services\EntriesService.php(176): Craft\ElementsService-&gt;saveElement()
#7 C:\wamp64\www\craft\app\controllers\EntriesController.php(462): Craft\EntriesService-&gt;saveEntry()
#8 C:\wamp64\www\craft\app\framework\web\actions\CInlineAction.php(49): Craft\EntriesController-&gt;actionSaveEntry()
#9 C:\wamp64\www\craft\app\framework\web\CController.php(308): CInlineAction-&gt;runWithParams()
#10 C:\wamp64\www\craft\app\framework\web\CController.php(286): Craft\EntriesController-&gt;runAction()
#11 C:\wamp64\www\craft\app\framework\web\CController.php(265): Craft\EntriesController-&gt;runActionWithFilters()
#12 C:\wamp64\www\craft\app\framework\web\CWebApplication.php(282): Craft\EntriesController-&gt;run()
#13 C:\wamp64\www\craft\app\etc\web\WebApp.php(823): Craft\WebApp-&gt;runController()
#14 C:\wamp64\www\craft\app\etc\web\WebApp.php(287): Craft\WebApp-&gt;_processActionRequest()
#15 C:\wamp64\www\craft\app\framework\base\CApplication.php(185): Craft\WebApp-&gt;processRequest()
#16 C:\wamp64\www\craft\app\index.php(62): Craft\WebApp-&gt;run()
#17 C:\wamp64\www\public_html\index.php(19): require_once()
REQUEST_URI=/public_html/admin/entries/pages/90-cherries
I was able to fix the issue - it had to do with the URL structure I had set in the Section's URL format area. For nested entries, I had put {parent-uri}/{slug} when in fact it needed to be {parent.uri}/{slug}.

I can now assign parents to entries and this is reflected in the URLs on the front end.