apostrophecms / apostrophecms/apostrophe
Missing mongodb field "lastPublishedAt" for parked pages.
- Dominant language
- JavaScript
- Stars
- 4.6k
- Forks
- 650
- Avg merge
- 19h 21m
- Merged PRs (30d)
- 23
Description
## To Reproduce
Step by step instructions to reproduce the behavior:
> 1. Create parked page in page module options for example:
```
park: [
{
parkedId: 'blogParkedId',
slug: '/blog',
title: 'Blog',
type: 'default-page',
},
]
```
> 2. Run npm run dev
> 3. Check mongodb aposDocs collection and find Blog page in published version, there is no lastPublishedAt field.

> 4. Then you can create some page and try to move this page as child of parked page. This throw a forbidden error.

>5. Tested on newly created project by CLI.
## Expected behavior
> A parked page should have DB field "lastPublishedAt",
## Describe the bug
> This causes an forbidden error (Publish parent page first), while moving another page under this parked page as child.
## Details
**Version of Node.js:**
16.13.0
**Server Operating System:**
Linux
Contributor guide
Research direction
Start by reproducing the issue in a newly created project with the shown page module park configuration, then inspect the published Blog document in the MongoDB aposDocs collection. Verify how parked pages are published and how child-page moves validate the parent. Done means the parked page has lastPublishedAt and another page can be moved beneath it without the forbidden error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100