Jump to content
Sign in to follow this  
kater

can't get some pages without include=all

Recommended Posts

hi,

guess i screwed up again but i fail to find the problem.

maybe someone can point me to a direction? :)

- there are a couple of pages (out of thousands) which i can't get/find/count unless i use include=all.

- none of these are either hidden, unpublished, trashed, access managed, or anything that would obviously differ them from the other pages with the same template.

- finder in the backend can also only find those pages using include=all as custom selector.

If i get without include=all, i'll end up with a "Error: Call to a member function numChildren() on a non-object (line 976 of ... /wire/core/Pages.php)". Thought there is no need for include=all in get anyway?

$eactivity = $row[0];
    $numberexist = $pages->count("activityid={$eactivity}, include=all");
      if ($numberexist >= 1) {
        $p = $pages->get("activityid={$eactivity}, include=all");
          ....

Share this post


Link to post
Share on other sites

Seems it happens to pages in which i update a page field via API. Going to check that again.

-> Those older pages had fields as page arrays but at some point got a value? assigned. Don't know how that happend without throwing an error. However, solved.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...