Skip to content

404 error when updating entries when max_depth is 1 #11534

Description

@jamie-b5

Bug description

This is a continuation of Issue 9668

When creating a new item after the first save I see a 404 error on the front end view. After the second save it is fine. It is also fine once I have cleared the application cache.

This only seems to affect collections with ordering and max depth of 1 (possibly more). Collections without ordering do not see this issue.

How to reproduce

I created a page (collection does not have ordering) and this did not 404 after the first save.

I created a vehicle (collection has ordering enabled, max depth = 1) this DID 404 after the first save.

I edited the vehicles collection and removed the ordering. I subsequently added a new test vehicle - this did not 404 after the first save.

Logs

Environment

Environment
Application Name: Paul Rhodes Commercials
Laravel Version: 10.48.28
PHP Version: 8.1.29
Composer Version: 2.4.2
Environment: production
Debug Mode: OFF
URL: prcommercialsyork.co.uk
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 0
Sites: 1
Stache Watcher: Disabled
Static Caching: half
Version: 5.49.1 PRO

Installation

Other (please explain)

Additional details

Cloned a recent repo then upgraded.

Credit to CjRootStudio for spotting the possible link to max depth/ordering.

See link for laravel log:

laravel.log

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions