Skip to content

NullPage that lacks ID in PageArray causes invalid selectors #1904

@Toutouwai

Description

@Toutouwai

Short description of the issue

The docs for NullPage state that:

The id property will always be 0 for a NullPage.

But this doesn't seem to be the case and it can cause and invalid selector when a NullPage exists in a PageArray and that PageArray is then used in a selector string (making use of PageArray::__toString).

Demo case:

2024-04-07_092938

The general point here is that it ought to be safe to use a PageArray in a selector without the user first needing to look for and remove any pages that lack an ID.

Setup/Environment

  • ProcessWire version: 3.0.236

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