Jump to content

Trying to get property 'noChildren' of non-object


sms
 Share

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.

Link to comment
Share on other sites

  • 2 months later...

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
Link to comment
Share on other sites

  • 3 weeks later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...