Skip to content

repeater.count only works after pagesave #413

@BernhardBaumrock

Description

@BernhardBaumrock

Short description of the issue

selectors like this fail if the page was never saved manually:
$pages->find('repeater.count>0');

Expected behavior

it should return all pages with at least one repeater item

Actual behavior

it returns only pages that where saved MANUALLY. pages that where populated via the API (setAndSave) or even saved via the API ($page->save()) will not appear on that selector.

Optional: Screenshots/Links that demonstrate the issue

https://processwire.com/talk/topic/17549-is-this-a-wrong-selector-or-bug/?do=findComment&comment=154214

Steps to reproduce the issue

  1. create a page with a repeater field
  2. create a new page and populate this repeater via the api
  3. do a $pages->find('repeater.count>0')->each('path');

it will only return manually saved pages.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions