Jump to content
sms

Trying to get property 'noChildren' of non-object

Recommended Posts

Hello to the forum,

since recently I get this notice when I create a new page with definded parent templates and children templates:

Notice: Trying to get property 'noChildren' of non-object in D:\xampp\htdocs\processwire-dev-3.0.170\wire\modules\PagePermissions.module on line 821

Line 821 of PagePermissions.module says:

if($page->template->noChildren) {
...

Any idea of what I could do or causes this notice?

Thank you very much in advance.

Share this post


Link to post
Share on other sites

This notice can happen if you use a page reference field in your template which has a wrong defined (i.e. deleted) parent page dependency.

In my case I had a blog-post template which contained a page reference field to category pages. Additionally I had a parent page defined containing the categories. The error occured when I deleted this parent page.

  • Like 1

Share this post


Link to post
Share on other sites

Sorry for my late reply, so much to do. I just had to write to you cause your idea helped me thinking in the right direction. Thanks again! 😀

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...