Skip to content

$repeaterItem->next() and $repeaterItem->prev() not accurate when not logged in #716

@TomS-

Description

@TomS-

Short description of the issue

->next() and ->prev() isn't correctly returning the next and previous item when not logged in. You have to include "include=all" even though repeater items are published and visible on the front-end.

Expected behavior

"include=all" should only be required to include unpublished/hidden items.

Actual behavior

It's ignoring published items unless "include=all" is used

Optional: Screenshots/Links that demonstrate the issue

https://processwire.com/talk/topic/20087-bug-different-output-for-logged-in-logged-out-users/

Optional: Suggestion for a possible fix

Use "include=all" for now.

Steps to reproduce the issue

  1. Create a repeater
  2. Try get information about the next or previous repeater item
  3. Check result based on being logged in or out

(I've been having a few issues with repeaters and ProDrafts. It could be an issue with ProDrafts, it may see it as a "Draft" element? - Only if this is not reproducible. It's worth noting however, ProDrafts is turned off)

Setup/Environment

  • ProcessWire version: 3.0.115
  • (Optional) PHP version:
  • (Optional) MySQL version:
  • (Optional) Any 3rd party modules that are installed and could be related to the issue:

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